Connecons
User Guide
© 2023 Microchip Technology Inc. and its subsidiaries
DS-50003529B - 23
3.3.5.4 AVR SPI Physical Interface
In-system programming 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.
3.3.5.4.1 Connecng to an AVR SPI Target
The recommended pinout for the 6-pin SPI connector is shown in 3.3.5.4.2. AVR SPI Pinout.
Connection to a 6-pin 100-mil SPI Header
Use the AVR 6-pin adapter board to connect to a standard 100-mil SPI header.
Connection to a 6-pin 50-mil SPI Header
Use the AVR 6-pin mini adapter board to connect to a standard 50-mil SPI header.
Important:
The SPI interface is eectively disabled when the debugWIRE Enable (DWEN) fuse is
programmed, even if the SPIEN fuse is also programmed. To re-enable the SPI interface, the
‘disable debugWIRE’ command must be issued while in a debugWIRE debugging session.
Disabling debugWIRE in this manner requires that the SPIEN fuse is already programmed.
If MPLAB X IDE 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.
Follow the instructions in the popup window that appears.
Info:
The SPI interface is often referred to as “ISP” since it was the rst in-system programming
interface on Microchip AVR products. Other interfaces are now available for in-system
programming.
3.3.5.4.2 AVR SPI Pinout
When designing an application PCB, which includes an AVR with the SPI interface, the pinout, as
shown in the gure below, should be used.
Figure 3-13. SPI Header Pinout
PDO/MISO
SCK
/RESET
VCC
PDI/MOSI
GND
1 2
SPI
Table 3-8. SPI Pin Mapping
AVR PORT Pins Target Pins SPI Pinout
Pin 1 (TCK) SCK 3
Pin 2 (GND) GND 6
Pin 3 (TDO) MISO 1
Pin 4 (VTG) VTG 2
Pin 5 (TMS)
Pin 6 (nSRST) /RESET 5
Pin 7 (not connected)
Pin 8 (nTRST)
Pin 9 (TDI) MOSI 4