
3
0943E–AVR–08/08
AVR910
AVR microcontroller will automatically set all its I/O pins to inputs, with pull ups disabled, when
Reset is active.
Figure 3. Connecting ISP Programming Cable to Target SPI Bus
To avoid problems, the In-System Programmer should be able to keep the entire Target System
Reset for the duration of the programming cycle. The target system should never attempt to
drive the three SPI lines while Reset is active.
SCK
When programming the AVR in Serial mode, the In-System Programmer supplies clock informa-
tion on the SCK pin. This pin is always driven by the programmer, and the target system should
never attempt to drive this wire when target reset is active. Immediately after the Reset goes
active, this pin will be driven to zero by the programmer. During this first phase of the program-
ming cycle, keeping the SCK Line free from pulses is critical, as pulses will cause the target AVR
to loose synchronization with the programmer. When in synchronization, the second byte ($53),
will echo back when issuing the third byte of the programming enable instruction. If the $53 did
not echo back, give Reset a positive pulse, and issue a new Programming Enable command.
Note that all four bytes of the of the Programming Enable command must be sent before starting
a new transmission.
The target AVR microcontroller will always set up its SCK pin to be an input with no pull up
whenever Reset is active. See also the description of the Reset wire.
Table 1. Connections Required for In-System Programming
Pin
Name
Comment
SCK
Serial Clock
Programming clock, generated by the In-System
Programmer (Master)
MOSI
Master Out – Slave In
Communication line from In-System Programmer
(Master) to target AVR being programmed (Slave)
MISO
Master In – Slave Out
Communication line from target AVR (Slave) to In-
System Programmer (Master)
GND
Common Ground
The two systems must share the same common ground
RESET
Target AVR MCU Reset
To enable In-System Programming, the target AVR Reset
must be kept active. To simplify this, the In-System
Programmer should control the target AVR Reset
V
CC
Target Power
To allow simple programming of targets operating at any
voltage, the In-System Programmer can draw power
from the target. Alternatively, the target can have power
supplied through the In-System Programming connector
for the duration of the programming cycle
SPI
DEVICE
AVR
uC
ISP
MISO
MOSI
SCK