Almost all the AVR's support the ISP programming. ISP stands for In-system Programming which means that these microcontrollers can be programmed while they are with in the end circuit. This reduces cost and time for programming and also reduces the programming difficulty. 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.The info about the ISP programming is provided in the AVR doc0943.
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.The Serial Peripheral Interface (SPI) consists of three wires: Serial ClocK (SCK),
Master In – Slave Out (MISO) and
Master Out – Slave In (MOSI).
In In-System Programming the 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.