English
Language : 

DS51795A Datasheet, PDF (26/98 Pages) Microchip Technology – PICkit™ 3 Programmer/Debugger
PICkit™ 3 User’s Guide
halted. The debugger communicates with the debug executive via PGC and PGD, gets
the breakpoint status information and sends it back to MPLAB IDE. MPLAB IDE then
sends a series of queries to the debugger to get information about the target device,
such as file register contents and the state of the CPU. These queries are ultimately
performed by the debug executive.
The debug executive runs just like an application in program memory. It uses some
locations on the stack for its temporary variables. If the device does not run, for
whatever reason, such as no oscillator, a faulty power supply connection, shorts on the
target board, etc., then the debug executive cannot communicate to the PICkit 3
programmer/debugger and MPLAB IDE will issue an error message.
Another way to get a breakpoint is to press the MPLAB IDE’s Halt button (the “pause”
symbol to the right of the Run arrow). This toggles the PGC and PGD lines so that the
in-circuit debug mechanism of the target device switches the Program Counter from the
user’s code in program memory to the debug executive. Again, the target application
program is effectively halted, and MPLAB IDE uses the debugger communications with
the debug executive to interrogate the state of the target device.
2.7 PROGRAMMING
Use the PICkit 3 programmer/debugger as a programmer to program an actual (non
-ICE/-ICD) device, i.e., a device not on a header board. Select “PICkit 3” from
Programmer>Select Programmer and compile/assemble your application code with
the “Build Configuration” list box on the MPLAB IDE toolbar set to “Release”. Also, it
may be set by selecting Project>Build Configuration>Release.
All debug features are turned off or removed when the debugger is used as a
programmer. When using the Programmer>Program selection to program a device,
MPLAB IDE will disable the in-circuit debug registers so the PICkit 3
programmer/debugger will program only the target application code and the
Configuration bits (and EEPROM data, if available and selected) into the target device.
The debug executive will not be loaded. As a programmer, the debugger can only
toggle the MCLR line to reset and start the target. A breakpoint cannot be set, and
register contents cannot be seen or altered.
The PICkit 3 programmer/debugger system programs the target using ICSP. VPP, PGC
and PGD lines should be connected as described previously. No clock is required while
programming, and all modes of the processor can be programmed, including code
protection, Watchdog Timer and table read protection.
2.8 RESOURCES USED BY THE DEBUGGER
For a complete list of resources used by the debugger for your device, please see the
on-line help file in MPLAB IDE for the PICkit 3 programmer/debugger.
DS51795A-page 22
© 2009 Microchip Technology Inc.