Building AVR Jtag clone
Finally, I found some time to finish the AVRJTAG clone. It was hanging for a while on a breadboard with a bunch of wires. I have made an Eagle CAD project with a PCB layout you will find at the article’s bottom.
I didn’t change the circuit very much from the 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 the 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 the AVR Studio simulator. The difference is that you have to connect the JTAG adapter to the target board. In my case, I am using the Atmega128L Piconomic board.
On the board, there is a connector for the Jtag adapter/debugger. The second option is to set the JTAGEN fuse for the target MCU.
Otherwise, AVR Studio will throw an error:
After the hardware is ready, let us try with the sample project. For this, create the AVR-GCC project in the 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 the debugger with the 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 the program is running in the real world. So it is easy to debug the 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