USB FT232 / JTAG HW

16 posts / 0 new
Last post
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,
I found simple but very nice idea for USB/AVR SPI programmer

http://tuxgraphics.org/electronics/200510/article05101.shtml

The Idea is very nice, all you need from begining is usb and unprogrammed avr chip... it uses ft232 usb chip BitBang mode to emulate SPI interface from PC for AVR initial bootloader programming.

I have idea to use same for JTAG interface - to create USB/JTAG interface only with one ft232 chip and create driver for PC to manage all jtag communication by BitBang mode.... no next AVR or the other uc in this hw, only PC/USB/ft232/JTAG/TargetBoard.

Has enyone know about existing project with this idea, or has any information, can be usefully to know ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bitbang mode is slooow

>> You can calculate approximately 15minutes for loading and 10minutes for verification.
15 minutes to load few kb firmware to mega88 via spi.
i dont think it will be usable for JTAG

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, it should by use only fore bootloader download and for DEBUG purposes, no as standart programming. The benefit is that this kind of hw will be implemented in final target board WITHOUT JTAG connector and you can debug target WITHOUT special JTAG HW via USB line, let say in customer office , without unassembling device and with laptop only....
By the way, JTAG communication si according me 2-4, or more efective than standart spi, so it can be from your 15 estimeted minutes only few minutes in reality.
PC driver is also able to keep last sended sw in memory and compare differences and sent to target only changes, so it can by very effective and usable ...
But I am not shure if JTAG synchro comm timming is able to be managed by BitBang fuunct. of ft232, if so, it is good idea for me....

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

first, that 15 minutes is not because use of SPI/ISP, its because bitbanging is slow. it wont go faster when bitbanging JTAG.
another thin is, bitbanging will put heavy load on usb bus, so it will need computer not to do anything else during programming.

if you are thinking about this as USB to JTAG bridge, then all JTAG things would have to be done in FTDI chip, and it will be slow.
you can use FTDI for initial bitbanging of bootloader, then upload firmware using bootloader. but no debugging

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Again, I not plan to use this for software upload, except of initial bootloader of course... this is job of bootloader. Once bootloader is programmed, this device will be use only for JTAG debug communication, which is really not as huge as download is.
And this 15 minutes, I have read approx. 20 mins in original link I used in first message. But they consider 20 for SPI downloadind and if you compare SPI and JTAG programming algorithm, JTAG is more effective then SPI, if I am correct, of course, I do not have realexperience, this is why my estimation is not 20 (or your 15) , as they have mention, but only few minutes....
I can tell that number of BitBang operations, you have to transfer via USB during JTAG proggramming in compare with count of BitBang operations in SPI is really much less.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have successfully used this method for my Chameleon project:

The trick to fast speeds is using synchronous bitbang rather than the old and one-USB-packet-per-byte bitbang of the early FTDI chips. Erasing, programming and verifying the full 32KB flash of an ATmega32 takes about 25 seconds this way (running at 8MHz).

Only one downside with synchronous bitbang: you get the results in blocks because of the buffering which means if something bad happens it will still empty the buffer to the AVR before you can detect the error. Still, communication at short distance between the AVR and an FT232 is really reliable.

As said earlier, it can also be used just to bootstrap the AVR and then use a software programmer using the standard RX/TX RS232 lines.

I have used the same method to program Altera MAX II CPLD's via bitbang. The 5 seconds programming time was even faster than the 25 seconds my Terasic USB blaster clone needed.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes. Nice. Thanks.
But I am not shure, you have done it via SPI , am i right ?
YOU HAVE CONFIRMED THAT THERE IS NOT ISSUE WITH TIME OF OPERATION, elapsed times are acceptable...
Good job !
But question is still active - JTAG ans synchro BB mode - is it possible ? JTAG solution open also debug possibilities... it is good benefit. Did you consider it before you realized your version ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have developed PC JTAG basic software with read/write support. So I am able from AVRStudio, with PC JTAG emulation and FT232 chip connected to JTAG target and programm targets flash. I would like to continue develop also debug utility, implement breakpoints and so on... BUT I do not have enough information about protocol. For example, AVR studio sends me
1B,19,00,18,00,00,00,0E,04,61,.......
command. Ok, this is memory write (04) command , but what does 61 means ? There is no 61 memory type in AVR0607 protocol description document. How should I interpret this instruction ?
Does anybody know ,where can I find this information ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just one comment .
Isp with Ftdi ( UM232R module only ) program a
mega8/88 in 5 seconds ( not 15 minuts ), is not so slow.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

dear everyone, i really curious about this USB with FTDI232 chip. im using CVAVR for programming AVR,

does it can replace SPI parallel port Kanda stk200 as well without using any change in compiler and also regardless AVR type?

if i look into the graph in chameleon project, the chip also connected into RXD and TXD. so... does it mean the serial port also cover in the FT232?

im sorry,i really dunno about USB connection.i intended to build AVR board ATMEGA128 with FT232,so i dont need to use parallel to program or serial port comm. at all by using this chip.it obsolete i think.

i just want to make sure about this before i spend money for doing nothing.

thank you, wait for your answers...... :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you want a USB JTAG you should look at the FT2232 instead.

See http://www.hs-augsburg.de/~hhoegl/proj/usbjtag/usbjtag.html for an example.

Pages