WRT54G JTAG To AVR Cable

Submitted by jon on Wed, 2007-05-30 21:08. ::
Here's a simple/free way to program one of Atmel's AVR microcontrollers for those that already have the WRT54G-style JTAG cable:

Parallel Port # --> JTAG --> AVR

#2 -> TDI -> MOSI
#3 -> TCK -> SCK
#4 -> TMS -> RESET
#13 -> TDO -> MISO
#18+ -> GND -> GND

All you need to do is find the right MOSI/SCK/RESET/MISO/GND pins for a particular AVR on its datasheet and connect it directly to the JTAG like above. Double check that it ends up in the right parallel port pin.

The parallel port here does not power the AVR, so you'll need 2 or 3 AA/AAA batteries, or anything 5V or less. Be careful with the voltage or you may fry something (like that nice motherboard).

Anyway, what you'll end up with is a simple dapa-like cable. :)

(more)

For the programmer, avrdude can be used using the "xil" type:

avrdude -p attiny13 -P lpt1 -c xil -U flash:w:example.hex

Easiest way to get all the software up and running is to install the WinAVR package which includes avrdude and gcc, and AVR Studio which includes an IDE and a simulator.

Since I'm a newb myself, I just did it on a breadboard with recycled stuff:



So far, I've tried it on an ATtiny13 and an ATtiny26, but I assume it will also work on others that can use dapa-like cables.