Connecons
User Guide
© 2023 Microchip Technology Inc. and its subsidiaries
DS-50003529B - 27
Note:
The debugWIRE interface can not be used as a programming interface. This means that the SPI
interface must also be available (as shown in 3.3.5.4.2. AVR SPI Pinout) in order to program the
target.
When launching a debug session using debugWIRE, ash will be programmed using the debugWIRE
interface. This is not an option which can be considered for factory programming.
When the debugWIRE enable (DWEN) fuse is programmed and lock-bits are un-programmed, the
debugWIRE system within the target device is activated. The /RESET pin is congured as a wire-AND
(open-drain) bidirectional I/O pin with pull-up enabled and becomes the communication gateway
between target and debugger.
3.3.5.8.1 AVR Connecng to debugWIRE
The recommended pinout for the 6-pin debugWIRE (SPI) connector is shown in 3.3.5.8.2. AVR
debugWIRE Pinout.
Connection to a 6-pin 100-mil SPI Header
Use the 6-pin 100-mil tap on the at cable (included in some kits) to connect to a standard 100-mil
SPI header.
Connection to a 6-pin 50-mil SPI Header
Use the adapter board (included in some kits) to connect to a standard 50-mil SPI header.
Although the debugWIRE interface only requires one signal line (RESET), VCC, and GND to operate
correctly, it is advised to have access to the full SPI connector so that the debugWIRE interface can
be enabled and disabled using SPI programming.
When the DWEN fuse is enabled, the SPI interface is overridden internally for the OCD module to
have control of the RESET pin. The debugWIRE OCD is capable of disabling itself temporarily, thus
releasing control of the RESET line. The SPI interface is then available again (only if the SPIEN fuse
is programmed), allowing the DWEN fuse to be un-programmed using the SPI interface. If power is
toggled before the DWEN fuse is un-programmed, the debugWIRE module will again take control of
the RESET pin. Normally MPLAB X IDE or Microchip Studio will automatically handle the interface
switching, but it can also be done manually using the button on the debugging tab in the properties
dialog in Microchip Studio.
Note: It is highly recommended to let MPLAB X IDE or Microchip Studio handle the setting and
clearing of the DWEN fuse.
It is not possible to use the debugWIRE interface if the lockbits on the target AVR device are
programmed. Always be sure that the lockbits are cleared before programming the DWEN fuse and
never set the lockbits while the DWEN fuse is programmed. If both the debugWIRE Enable (DWEN)
fuse and lockbits are set, one can use High Voltage Programming to do a chip erase, and thus clear
the lockbits. When the lockbits are cleared, the debugWIRE interface will be re-enabled. The SPI
Interface is only capable of reading fuses, reading signature, and performing a chip erase when the
DWEN fuse is un-programmed.
3.3.5.8.2 AVR debugWIRE Pinout
When designing an application PCB which includes an Microchip AVR with the debugWIRE interface,
the pinout shown in the gure below should be used.
Figure 3-17. debugWIRE (SPI) Header Pinout
PDO/MISO
SCK
/RESET
VCC
PDI/MOSI
GND
1 2
SPI