Make your own AVR JTAG debugger using atmega

AVR JTAG debugger

Tired of putting LEDs every time you want to check some value in the microcontroller? Well, its time to build yourself a debugger.

AVR JTAG debugger

A debugger is a device which helps you run through your code in the microcontroller step by step and also gives you the ability to read or write the registers directly using the PC which means you can check the value of any register or any variable at any time without the need for any external components like LEDs or seven segment displays. A debugger will help you immensely when you’re in the prototyping phase of any project. Since I almost entirely use AVR, I’ll be showing you how to build an AVR debugger. AVR has many debuggers like the AVR Dragon, AVR One, AVR JTAGICE mkII etc. The problem is they cost hundreds of dollars and are hard to get in India. The AVR JTAGICE(not mkII) however, has been made open source by Atmel and therefore anyone can build it. The only drawback of this debugger is that it supports only a limited number of microcontrollers but hey its open source and dirt cheap to build, so what did you expect?
Compatible devices with AVR JTAGICE:
ATmega16(L), ATmega162(L), ATmega169(L or V), ATmega32(L), ATmega323(L), ATmega64(L), ATmega128(L).
I borrowed the schematic from
Since I don’t own an ancient PC, I was forced to use a USB to serial converter. If the converter is TTL compatible, which it will be in most cases, you won’t need the level shifter IC (MAX232). I also wanted the debugger to act as a programmer for non-JTAG capable devices, so I had to create everything from scratch on EAGLE and make a board layout.
The EAGLE schematic and board files can be downloaded here.
If you don’t have EAGLE, download the files in PDF format here.
Etch the PCB using the layout provided(If you don’t know how to etch a PCB, see this tutorial). You can also try the circuit on a breadboard but if you’ll be using it all the time it’s better to make it on a PCB since it’ll be much more compact and robust.

Make your own AVR JTAG debugger 1

It’s important that you use a 7.3728Mhz crystal and not 8Mhz as it will affect the baud rate and the debugger won’t work.

After you’re done building the circuit, its time to upload the firmware to the microcontroller(ATMEGA16). You can use any programmer you currently have like USBasp or USBtiny etc.

Read More:  Make your own AVR JTAG debugger

Leave a Comment

Your email address will not be published. Required fields are marked *