#navbar-iframe { display: none !important; }
webstats

Thursday 27 August 2009

AVR IN SYSTEM PROGRAMMING SCHEMA

AVR910: In-System Programming
Features
• Complete In-System Programming Solution for AVR Microcontrollers
• Covers All AVR Microcontrollers with In-System Programming Support
• Reprogram Both Data Flash and Parameter EEPROM Memories
• Complete Schematics for Low-cost In-System Programmer
• Simple Three-wire SPI Programming Interface
Introduction
In-System Programming allows programming and reprogramming of any AVR microcontroller
positioned inside the end system. Using a simple Three-wire SPI interface,
the In-System Programmer communicates serially with the AVR microcontroller,
reprogramming all non-volatile memories on the chip.

In-System Programming eliminates the physical removal of chips from the system.
This will save time, and money, both during development in the lab, and when updating
the software or parameters in the field.

This application note shows how to design the system to support In-System Programming.
It also shows how a low-cost In-System Programmer can be made, that will
allow the target AVR microcontroller to be programmed from any PC equipped with a
regular 9-pin serial port. Alternatively, the entire In-System Programmer can be built
into the system allowing it to reprogram itself.

The Programming Interface
For In-System Programming, the programmer is connected to the target using as few
wires as possible. To program any AVR microcontroller in any target system, a simple
Six-wire interface is used to connect the programmer to the target PCB. Figure 1
below shows the connections needed.
The Serial Peripheral Interface (SPI) consists of three wires: Serial ClocK (SCK), Master
In – Slave Out (MISO) and Master Out – Slave In (MOSI). When programming the
AVR, the In-System Programmer always operate as the Master, and the target system
always operate as the Slave.

The In-System Programmer (Master) provides the clock for the communication on the
SCK Line. Each pulse on the SCK Line transfers one bit from the Programmer (Master)
to the Target (Slave) on the Master Out – Slave In (MOSI) line. Simultaneously,
each pulse on the SCK Line transfers one bit from the target (Slave) to the Programmer
(Master) on the Master In – Slave Out (MISO) line.

8-bit
RISC
Microcontroller
Application
Note