1.11.9

News

11-Jul-2010
Category: tools
Posted by: cyclonite
Untitled document We created a tool to generate any kind off BB-code or HTML-code data for images.
27-Apr-2010
Category: General
Posted by: cyclonite
Untitled document The Diecyde website has been restyled
CMS - 1.11.9 - Bartolome
 

AVR JTAG interface

On the internet I came across a website which explained how to make an AVR JTAG interface.

This interface can be used to debug certain AVR microcontrollers of Atmel.

I like this interface very much because it allows you to program your microcontrollers like the ISP interface and at the same time it is possible to debug your microcontroller in its definite circuit surroundings.
As any programmer would agree with me there is no subsitution for programming/debugging with the target PCB.
On emulators the timings or capacities in circuits allways will change.

So I fetched a prototype PCB and a Atmega16 and soldered them together according the schematic which I found.

I came up with this:
jtag

And how it is connected to my stk501:
stk501

I quickly modified the old schematic I found and added some usefull stuff to it , like an external power supply and an ISP
connector for the initial bootloader.

This is the schematic I came up with:

and the boards...

brd

plain

This board is only 6.5 x 4 cm and has just 6 wirebridges (marked as top layer).

It should be relatively easy to produce...


How to build your own JTAG interface!

There are a few steps you would have to take

First you would have to make your own print.
the eagle schematics of the images you see above can be downloaded HERE

Then you need to get this board assembled and be sure to use a 7.3728MHZ XTAL

For the next step you need an ISP programmer to upload a Bootloader to the atmega via the ISP port on the print. (I used the STK500)

The bootloader can be obtained HERE (MIRROR ON THIS SERVER)

You would have to upload this to the Atmega and set the fuses to(bootflash size 1024, address 0x1c00), Enable(bootrst), and set SUT_CKSEL to(external crystal medium frequency 258ck + 4ms)

Now you can disconnect the ISP and connect an serial cable to the device and you computer.

Be sure you have installed AVR_STUDIO, this can be downloaded free from the atmel site , search for "avr studio"

locate avrProg.exe in "C:\Program Files\Atmel\AVR Tools\AvrProg" this may be different on your pc, now execute avrprog

The board will be detected and you now will be able to upload the JTAG firmware to the board, this can be found under "C:\Program Files\Atmel\AVR Tools\JTAGICE" (this may be a different path on your computer) locate upgrade.ebn

Now click on program, the file should upload without any problems, if you encounter an error just ignore this.

You now have a working JTAG interface, congratulations!

Now the best way to protect this software from being overwritten any time later is to disable the bootloader, to do this you will have to reconnect the ISP connector.

Now go to the Atmega16 fuses and disable (bootrst)

Now you are completely finished, just connect your JTAG to your JTAG port of any board you which to debug and just start AVR-studio, you should be able to connect to it.

If you experience problems then just don't be shy to mail me cyclonite(at)diecyde.com (remove the (at) )

Previous page: Laser projector  Next page: Generator controller