Building AVR Jtag clone
Finally, I found some time to finish AVRJTAG clone. It was hanging for a while on a breadboard with a bunch of wires. I have made an Eagle CAD project with PCB layout you will find at the bottom of the article.
I didn’t change the circuit very much from previous, just added ISP header(but didn’t have a chance to test it) and transferred to Eagle project as I didn’t find one ready to build:
The description on how to update firmware is in previous article <Build your own AVR JTAG ICE clone>.
Testing AVR Jtag in action
Let’s give a test run. Using Jtag is as easy as using AVR Studio simulator. The difference is that you have to connect JTAG adapter to target board. In my case, I am using Atmega128L Piconomic board.
In the board, there is a connector for Jtag adapter/debugger. The second option is to set JTAGEN fuse for target MCU.
Otherwise, AVR Studio will throw an error:
After the hardware is ready, let us try with the sample project. For this create AVR-GCC project in AVRStudio environment. Then select debugger platform (JTAG ICE) and AVR MCU(in my case Atmega128):
Write a simple program which controls a button and LED: button_led.c
Compile the program and start debugger with run command. You can work with JTAG debugger as with simulator – stepping, auto-stepping, break-points, memory views, changing register and memory values and so on.
One difference that program is running in the real world. So it is easy to debug platform with additional peripherals connected to MCU. And of course real-time execution.
Project files for Eagle CAD and boot-loader are here: avr_jtag_clone.zip