Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
lubo1
PostPosted: Nov 28, 2007 - 05:02 PM
Rookie


Joined: Nov 28, 2007
Posts: 39


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

http://tuxgraphics.org/electronics/2005 ... 5101.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 ?
 
 View user's profile Send private message  
Reply with quote Back to top
Corwin
PostPosted: Nov 28, 2007 - 05:53 PM
Rookie


Joined: Apr 23, 2007
Posts: 43
Location: Czech Republic

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
 
 View user's profile Send private message  
Reply with quote Back to top
lubo1
PostPosted: Nov 28, 2007 - 06:03 PM
Rookie


Joined: Nov 28, 2007
Posts: 39


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....
 
 View user's profile Send private message  
Reply with quote Back to top
Corwin
PostPosted: Nov 28, 2007 - 06:43 PM
Rookie


Joined: Apr 23, 2007
Posts: 43
Location: Czech Republic

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
 
 View user's profile Send private message  
Reply with quote Back to top
lubo1
PostPosted: Nov 28, 2007 - 07:23 PM
Rookie


Joined: Nov 28, 2007
Posts: 39


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.
 
 View user's profile Send private message  
Reply with quote Back to top
madwizard
PostPosted: Nov 28, 2007 - 07:47 PM
Wannabe


Joined: Apr 27, 2005
Posts: 73
Location: Netherlands

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.
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
lubo1
PostPosted: Nov 28, 2007 - 08:22 PM
Rookie


Joined: Nov 28, 2007
Posts: 39


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 ?
 
 View user's profile Send private message  
Reply with quote Back to top
lubo1
PostPosted: Dec 21, 2007 - 07:02 PM
Rookie


Joined: Nov 28, 2007
Posts: 39


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 ?
 
 View user's profile Send private message  
Reply with quote Back to top
zurca
PostPosted: Jan 16, 2008 - 03:57 AM
Rookie


Joined: Sep 26, 2007
Posts: 41


Just one comment .
Isp with Ftdi ( UM232R module only ) program a
mega8/88 in 5 seconds ( not 15 minuts ), is not so slow.
 
 View user's profile Send private message  
Reply with quote Back to top
UD
PostPosted: Jan 19, 2008 - 12:19 PM
Newbie


Joined: Sep 18, 2007
Posts: 14


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...... Smile
 
 View user's profile Send private message  
Reply with quote Back to top
CountZero
PostPosted: Jan 19, 2008 - 03:46 PM
Resident


Joined: May 27, 2004
Posts: 695
Location: Sweden

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

See http://www.hs-augsburg.de/~hhoegl/proj/ ... bjtag.html for an example.
 
 View user's profile Send private message  
Reply with quote Back to top
zurca
PostPosted: Jan 20, 2008 - 06:06 AM
Rookie


Joined: Sep 26, 2007
Posts: 41


UD wrote:
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...... Smile



See this may be it can help you.

http://tvtel.pt/zelect111/FTDIAVR.htm

http://www.obdev.at/products/avrusb/bootloadhid.html

http://tvtel.pt/zelect111/Circuits_mine/AVR_IO_usb.zip
 
 View user's profile Send private message  
Reply with quote Back to top
lubo1
PostPosted: Apr 10, 2008 - 08:46 PM
Rookie


Joined: Nov 28, 2007
Posts: 39


There is actually version 2.10, with enhanced debug possibility !
http://www.lura.sk/?&LP=114SK&M ... &PO=''
 
 View user's profile Send private message  
Reply with quote Back to top
lubo1
PostPosted: May 17, 2008 - 02:40 PM
Rookie


Joined: Nov 28, 2007
Posts: 39


New version 2.14 of HappyJTAG2 is released.

High Level Source Code "Single Step" and "Run To Cursor" functions are implemented !
 
 View user's profile Send private message  
Reply with quote Back to top
perestoronin
PostPosted: Feb 01, 2012 - 11:00 AM
Newbie


Joined: Feb 01, 2012
Posts: 1


madwizard wrote:
I have successfully used this method for my Chameleon project:


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.

Please describe your method for programming CPLD via FT232R and upload or post link on sources of software + patches if applied used for program CPLD via FT232R

Thank you
 
 View user's profile Send private message  
Reply with quote Back to top
Kartman
PostPosted: Feb 01, 2012 - 11:25 AM
10k+ Postman


Joined: Dec 30, 2004
Posts: 11649
Location: Melbourne,Australia

You're about four years too late. I think you can find cheap programming dongles on ebay.
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits