User Guide

Obtaining Boards and Setting Fuses

First, obtain two ATmega644s. These can be mounted on either an STK500 or on a custom PC board.

On the board you intend to use as the debugger, ensure that the JTAGEN fuse is cleared.

On the target board, ensure that both the JTAGEN and OCDEN fuses are set.


Download the following four programs:





Put the four programs into a project in AVR Studio. Compile the project, and program it onto the debugger. Program the target board with any program to debug. Keep the lss and map files for the target board program for PC values and data addresses.

Connecting the Boards

Make sure the boards share a common ground by shorting the GND or one MCU to the GND of the other.

Connect port pin C.2 on one board to port pin C.2 on the other.

Connect port pin C.3 on one board to port pin C.3 on the other.

Connect port pin C.4 on one board to port pin C.4 on the other.

Connect port pin C.5 on one board to port pin C.5 on the other.

Running Code and the API

Our program runs from HyperTerminal. If the debugger is mounted on an STK500, connect a 2 pin flat jumper from the RXD and TXD pins to port pins D.0 and D.1. If the debugger is mounted on a custom PC board, put jumpers across the TR and REC pins. Connect the debugger to the computer with an RS232 connector, and open HyperTerminal.

When you are ready to start debugging, make sure that you turn on the debugger first, and then the target board second. The debugger will put the target board into reset mode. In order to start execution of the target board program, type "run" into the terminal.

You may begin debugging. For a list of debugging commands you can enter, see the API. The only instructions you may use while the target board is running are the "break" and "reset" commands. For all other commands, ensure that the target board is in reset mode or at a program break.