Page 1 of 1

Program AVR over JTAG without expensive dongles ?

Posted: Wed Jun 27, 2012 8:48 pm
by TmEE co.(TM)
Just as the title says ^^

Does anyone know a way to program an AVR (Atmega165. Atmega325) over LPT based JTAG cable ?

I have sunk into google and its endless not very useful threads.

I got AVR Studio4 installed to write code.
For proamming I have found Ponyprog and AVRdude. Ponyprog does not support that AVRs I want but it can do a lot of other nice things.
AVRdude seems most promising, but I don't think it does cool stuff with LPT JTAG cable...

Does anyone have any experience ?

Re: Program AVR over JTAG without expensive dongles ?

Posted: Fri Jun 29, 2012 3:21 am
by danielt3
I think I can help.

You can actually build a simple interface like STK200/300 and use it in AVRDude, which supports most AVR devices. PonyProg is a nice tool but since it is not mantained anymore, I don't think it will get support for newer AVRs.

STK200/300 is almost a standard in AVR programming. The schematic is here: http://www.lancos.com/prog.html#hardware

P.S.: these are not JTAG. They are just an electrical interface to SPI for flashing AVRs.
TmEE co.(TM) wrote:Just as the title says ^^

Does anyone know a way to program an AVR (Atmega165. Atmega325) over LPT based JTAG cable ?

I have sunk into google and its endless not very useful threads.

I got AVR Studio4 installed to write code.
For proamming I have found Ponyprog and AVRdude. Ponyprog does not support that AVRs I want but it can do a lot of other nice things.
AVRdude seems most promising, but I don't think it does cool stuff with LPT JTAG cable...

Does anyone have any experience ?

Posted: Fri Jun 29, 2012 8:10 am
by TmEE co.(TM)
I am aware about SPI kind, I am hoping to use JTAG instead, but if that's not gonna work I'll have to redo part of one board of mine and go SPI instead.
I ordered some samples from Atmel which should arrive next week and I will then see if AVRdude can talk to the AVR over JTAG using Xilinx LPT cable or not.

Posted: Fri Jun 29, 2012 11:05 am
by danielt3
Well, if it is just to download firmware to the AVR flash memory, SPI will go fine. JTAG is used for more sophisticated stuff like real-time debugging and electrical testing.

If you are interested in debugging your code inside the AVR or boundary scan, you can order some special hardware from Atmel. There are three of these; JTAGICE3, JTAGICE mkII and JTAGICE Adapter (which runs through serial port of the PC).

Also there are some schematics floating around to build a AVR-Studio compatible JTAG device. It runs through serial port of the PC and uses a AVR microcontroller itself with a special firmware that implements the JTAG protocol. Check: http://www.scienceprog.com/build-your-o ... ice-clone/

TmEE co.(TM) wrote:I am aware about SPI kind, I am hoping to use JTAG instead, but if that's not gonna work I'll have to redo part of one board of mine and go SPI instead.
I ordered some samples from Atmel which should arrive next week and I will then see if AVRdude can talk to the AVR over JTAG using Xilinx LPT cable or not.

Posted: Fri Jun 29, 2012 7:29 pm
by TmEE co.(TM)
I am going to write my own JTAG programmer software, all info is present on the datasheet and even algos to do fun.
I just got to make JTAG clear to me, and it is going nicely :D

Posted: Fri Jul 20, 2012 9:43 pm
by prophet36
Sorry for late reply, hope it's not too late to be of some help.

You can use "flcli" from FPGALink:

http://www.makestuff.eu/wordpress/?page_id=1400

...with a Minimus board (I paid £2.70 or so for mine, but that was a bulk order):

http://www.makestuff.eu/wordpress/?p=1927

...which will download AVR code via JTAG, but it expects an SVF file so you need to use the avrsvf tool:

http://www.avrfreaks.net/index.php?modu ... tem_id=312

Which unfortunately is Windows-only.