Datasheet
Emulator User’s Guide for MPLAB X IDE
DS52085A-page 38 2013 Microchip Technology Inc.
3.7 DEBUGGING WITH THE EMULATOR
There are two steps to using the MPLAB REAL ICE in-circuit emulator system as a
debugger. The first requires that an application be programmed into the target device.
The second uses the internal in-circuit debug hardware of the target Flash device to run
and test the application program. These two steps are directly related to the MPLAB
IDE operations:
1. Programming the code into the target and activating special debug functions
(see the next section for details).
2. Debugging the code using features such as breakpoints.
If the target device cannot be programmed correctly, the MPLAB REAL ICE in-circuit
emulator will not be able to debug.
Figure 3-13 shows the basic interconnections required for programming and debug-
ging. Note that this is the same as Figure 3-8, but for the sake of clarity, the V
DD and
V
SS lines from the emulator are not shown.
FIGURE 3-13: PROPER CONNECTIONS FOR PROGRAMMING
A simplified diagram of some of the internal interface circuitry of the MPLAB REAL ICE
in-circuit emulator pod is shown. For programming, no clock is needed on the target
device, but power must be supplied. When programming, the emulator puts program-
ming levels on V
PP, sends clock pulses on PGC and serial data via PGD. To verify that
the part has been programmed correctly, clocks are sent to PGC and data is read back
from PGD. This conforms to the ICSP protocol of the device under development. See
the device programming specification for details.
+5V
Programming
4.7 k
4.7 k
VPP/MCLR
PGC
PGD
1
5
4
Internal Circuits
VSS
VDD
Voltage