AVR JTAGICE Clone: JTAGICE With USB Interface
The picture shows that JTAGICE is debuging a butterfly.
This AVR JTAGICE clone is based on Evertool's schematic and bootloader,
Evertool is a JTAGICE compatible programmer/debuger. With it's bootloader,
This JTAGICE clone can programe itself using avrprog.exe which is contained
in AVRSTUDIO.
I just add a USB-to-Serial interface to the existing hardware, it cannot
speed up the debuging.
You are recommended to visit:
http://www.siwawi.arubi.uni-kl.de/avr_projects/evertool/
From this Evertool's original site, you can get schematics, bootloader,
and other sources.
Please visit Evertool's original website, I built this JTAGICE clone
according to "Evertool Light", and a FT232BM substitute the MAX232,
in order to use USB interface.
The schematic of FT232BM circuit is simply a copy from FT232BM Designers Guide
(VERSION 1.1), on page 2, "Figure 1.0 FT232BM - 5 volt Bus Powered
Example Schematic (232-5VB)". You can find this Designers Guide from:
http://www.ftdichip.com (Now it's updated to VERSION 2.0)
You should following these steps to download the firware to AVR JTAGICE clone.
Of course you need a programmer (i.e. STK500), but for those Linux users,
you must prepare the following items:
- avrprog.exe, a part of AVRSTUDIO
- Upgrade.ebn, a part of AVRSTUDIO
- A true windows system, which can run avrprog.exe correctly. If you use WINE,
avrprog.exe will fail with message "target board not found" or something like that.
- make sure all your hardware can work correctly.
- Write bootloader (evertool.hex) to ATmega16.
- Write fuse and lock-bits of ATmega16:
low fuse: 0xff (in order to use 7.3728MHz crystal)
high fuse: 0xd8 (in order to set boot size to 1024 words, disable OCD, disable JTAG and enable SPI.)
lock-bits: 0x2f (SPM instruction is not allowed for boot sector)
- Pull down PC6 of ATmega16 to GND.
- Connect your JTAGICE to PC, through serial port or USB-to-Serial interface.
- In your microsoft windows system, run avrprog.exe, it will detect ATmega16's bootloader,
then you can select the file "Upgrade.ebn" - it's in a encrypt format that only avrprog.exe can
decode - and program it to ATmega16.
- Open PC6 of ATmega16.
Now you have a ready-to-use AVR JTAGICE.
I think this JTAG debuger can work well in AVRSTUDIO, but for Linux users, we may use two GNU tools:
avarice and avr-gdb.
When you installed avarice and avr-gdb, connected JTAGICE to PC's serial port($SERIAL-PORT)
and target microcontroller($PART), power on the target board, then run:
$avarice -P $PART -j $SERIAL-PORT: $TCP-PORT
avarice will open a TCP port($TCP-PORT, usually 4242) for listening to GDB's connection.
Next we can run avr-gdb to begin debug, the following is a example:
$avr-gdb
...
file example.elf
target remote localhost:4242
load
break main
continue
...
sun ge
2007-10-26