My homemade AVR JTAG debugger.
ATMega16 microcontroller: 160 Rupees.
Other Circuit components: 60 Rupees.
Solder wire: 15 Rupees.
AVR-GCC/AVR-GDB: Zero (if you exclude the broadband cost of downloading)
The sense of satisfaction when I was finally able to debug AVR code on chip using my new homemade JTAG, over Linux: PRICELESS !!
Yes !! I was finally able to finish setting up my AVR development environment and let me tell you, the night I did it, I was not able to sleep due to excitement !
In my previous post, I had mentioned as to how I was able to come up with a minimal setup consisting of a programmer board and a general purpose development board for the Atmel AVR series of microcontrollers. Well, now that setup is complete, with the addition of a fully functional JTAG board. What this JTAG board allows me, is to examine my code execute at runtime on the actual hardware without incurring any execution overheads. It allows me to change variables at will, put breakpoints wherever I wish and inspect how my embedded program behaves. All these greatly increase my productivity as a programmer.
When I was working with the AT89S52 (an 8052 variant from Atmel) I did not have the luxury of on chip JTAG debugging and as a result I would spend hours trying to solve bugs which were very simple and would have got caught if I had some kind of on chip debugger. Solving bugs then was mainly by ‘thinking’ or by lighting up LEDs (in stead of ‘printf()’ statements that we use in our ‘normal’ programs for debugging).
The circuit schematics for this JTAG board are from the aquaticus ROV project site. And as usual I managed to take some photographs of this new JTAG board while I was constructing it.

Starting the construction of my JTAG board. Here you can see the IC bases of the MAX232 and the ATMega16 along with the crystal soldered on the PCB.

With some more components soldered. Notice the USB connector for supplying power to the board directly from my PC USB and the JTAG connector.

The completed board. Notice the serial port connector at the bottom left corner and the actual ICs snapped onto the board finally. Also notice the 10 pin JTAG connecting ribbon to the right.

The completed JTAG board in action. To its left, you can see my prototyping board. And further to the left I have a red LED connected to the pin 0 of port B. I am blinking this LED through a very small C program. The program execution can be stepped through using gdb in my host system.

And finally, my new JTAG board in action on my Linux host. The program source code is at the bottom left corner of the screen and behind in the terminal, you can see AVARICE running in the background accepting connections from GDB. GDB, running within DDD GUI, is the top most window where you can clearly see a breakpoint being hit.
And also, here is a short video of by JTAG board in action:
Hope you liked this post. Stay tuned for more posts as I embark on a new journey of exploring the AVR microcontroller !
Excellent hacking. Especially the video is very nice. Here’s hoping you design some fundoo stuff with this!
Put up some detailed instructions for newbies like me… on how to download the code to the AVR processor etc.
Ammmmaazing stuff man!!!
Seemanta, At this younge Age . u need a gf and not this stupid “Debugger” …. Seriously
!!!!
Wonderful work Seemanta..….I am very proud to have Frd like you ….One day I am sure you will get India nobel prize…
make some unique toy for my son.Like..if he talk something..toy should reply…
Seemanta, Great work. I liked the progression of pictures that you managed to take while constructing the kit .
I also liked this new 3 column theme you have used ! The blog looks very nice .
Simply awesome, truly great.
Hi,can you send the schematic for this jtag debugger hardware to my e-mail?Currently I am using a parallel port programmer but with this hardware,debugging will become very easy.
The original link is: http://aquaticus.info/JTAG
I am posting this link here rather than replying via email to you in private so that everyone who reads this blog is benefited.
~seemanta
Thank you for the reply.But the circuit do not contain USB interface and your board has one.So debugging can be done via USB?If so please post the schematic of it.I have seen the link but the circuit has only Serial interface.
Hi seemanta, please enlighten me on something….what range of pins does this support? thanks =)
Hi seemanta, one more question please. The vsupp pin on the JTAG cable port requires how much voltage? i look forward to your response thanks =)