
4
0943E–AVR–08/08
AVR910
The minimum low and high periods for the Serial Clock (SCK) input are defined in the program-
ming section of the datasheet. For the AT90S1200 they are defined as follows:
Low: >1 XTAL1 clock cycle
High: >4 XTAL1 clock cycles
MOSI
When programming the AVR in Serial mode, the In-System Programmer supplies data to the
target on the MOSI 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.
The target AVR microcontroller will always set up its MOSI pin to be an input with no pull up
whenever Reset is active. See also the description of the Reset wire.
MISO
When Reset is applied to the target AVR microcontroller, the MISO pin is set up to be an input
with no pull up. Only after the “Programming Enable” command has been correctly transmitted
to the target will the target AVR microcontroller set its MISO pin to become an output. During this
first time, the In-System programmer will apply its pull up to keep the MISO line stable until it is
driven by the target microcontroller.
V
CC
When programming the target microcontroller, the programmer outputs need to stay within the
ranges specified in the DC Characteristics.
To easily adapt to any target voltage, the programmer can draw all power required from the tar-
get system. This is allowed as the In-System Programmer will draw very little power from the
target system, typically no more than 20 mA. The programmer shown in this application note
operates in this mode.
As an alternative, the target system can have its power supplied from the programmer through
the same connector used for the communication. This would allow the target to be programmed
without applying power to the target externally.
Programming
Protocol
Immediately after Reset goes active on the target AVR microcontroller, the chip is ready to enter
Programming mode. The internal Serial Peripheral Interface (SPI) is activated, and is ready to
accept instructions from the programmer. On the AT90S1200, it is very important to keep the
Table 2. Recommendations when Designing Hardware Supporting In-System Programming
Pin
Recommendation
GND
Connect ground of the target to ground of the In-System Programmer
RESET
Allow the In-System Programmer to Reset the target system
SCK
When the target AVR microcontroller reset is active, this line should be controlled by
the ISP Programmer. Edges on this line after Reset is pulled low will be critical,
and cause the target AVR microcontroller to loose synchronization with the
programmer. When programming, oscillations on this pin should be tolerated by the
surrounding system when the AVR Reset is active
MOSI
When the target AVR microcontroller Reset is active, this line should be controlled
by the ISP Programmer. When programming, oscillations on this pin should be
tolerated by the surrounding system when the AVR Reset is active.
MISO
When the target AVR microcontroller Reset is active, this line should be allowed to
become an output. When programming, oscillations on this pin should be tolerated
by the surrounding system when the AVR Reset is active
V
CC
Allow the In-System Programmer to draw power from the target system, to adapt to
any allowed target voltage. The maximum current needed to power the programmer
will vary depending on the programmer being used.