3.1 SPI
In-system programming (ISP) uses the target Microchip AVR’s internal SPI (Serial Peripheral Interface) to download code into the Flash and EEPROM memories. It is not a debugging interface.
Use the pinout shown in the figure below when designing an application PCB with an AVR
with the SPI interface included.
Info: The SPI interface is
often referred to as “ISP” since it was the first in-system programming interface on
Microchip AVR products. Other interfaces are now available for in-system
programming.
Direct Connection to a Standard 6-pin 100-mil SPI Header
Use the included 100-mil 6-pin flat cable to connect directly to a board supporting the SPI header type. Note the pin-1 marking on the cable, and ensure to line it up with the pin-1 marking on the AVR Programming Adapter.
Important: The SPI interface is effectively disabled
when the debugWIRE enable fuse (DWEN) is programmed, even if the SPIEN fuse is also
programmed. Issue the ‘disable debugWIRE’ command while in a debugWIRE debugging
session to re-enable the SPI interface. Disabling debugWIRE in this manner requires
that the SPIEN fuse is already programmed. If MPLAB® X IDE or
Microchip Studio fails to disable debugWIRE, it is probably because the SPIEN fuse
is NOT programmed. If this is the case, it is necessary to use a high-voltage
programming interface to program the SPIEN fuse.
MPLAB® Debugger/Programmer Hardware Tools | SPI Pin Mapping | |||
---|---|---|---|---|
Pin # | Pin Name | Header Pin # | Name | Description |
1 | TVPP | |||
2 | TVDD | 2 | VCC | Target voltage reference |
3 | GND | 6 | GND | Common ground |
4 | PGD | 1 | PDO/MISO | SPI data input pin to the programmer. Connect to the MISO pin on the target device. |
5 | PGC | 3 | SCK | SPI serial clock output |
6 | TAUX | 5 | RESET | Target reset control pin |
7 | TTDI | 4 | PDI/MOSI | SPI data output pin for the programmer. Connect to the MOSI pin on the target device. |
8 | TTMS |