Building AVR Jtag clone
Finally I found some time to finish AVRJTAG clone. It was hanging for a while on a breadboard with bunch of wires. I have made an Eagle CAD project with PCB layout you will find at the bottom of 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:
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 easy as using AVR Studio simulator. Difference is only that you have to connect JTAG adapter to target board. Im my case I am using Atmega128L Piconomic board.
In the board there is a connector for Jtag adapter/debugger. Second option is to set JTAGEN fuse for target MCU.
Otherwise AVR Studio will throw an error:
After hardware is ready lets try with 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 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 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