13.07.2015 Views

MPLAB ICD 3 In-Circuit Debugger User's Guide

MPLAB ICD 3 In-Circuit Debugger User's Guide

MPLAB ICD 3 In-Circuit Debugger User's Guide

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>MPLAB</strong> ® <strong>ICD</strong> 3 <strong>In</strong>-<strong>Circuit</strong> <strong>Debugger</strong> User’s <strong>Guide</strong>The debug executive runs just like an application in program memory. It uses somelocations on the stack for its temporary variables. If the device does not run, forwhatever reason, such as no oscillator, a faulty power supply connection, shorts on thetarget board, etc., then the debug executive cannot communicate to the <strong>MPLAB</strong> <strong>ICD</strong> 3in-circuit debugger and <strong>MPLAB</strong> IDE will issue an error message.Another way to get a breakpoint is to press the <strong>MPLAB</strong> IDE’s Halt button (the “pause”symbol to the right of the Run arrow). This toggles the PGC and PGD lines so that thein-circuit debug mechanism of the target device switches the Program Counter from theuser’s code in program memory to the debug executive. Again, the target applicationprogram is effectively halted, and <strong>MPLAB</strong> IDE uses the debugger communications withthe debug executive to interrogate the state of the target device.2.8 PROGRAMMING WITH THE DEBUGGERUse the <strong>MPLAB</strong> <strong>ICD</strong> 3 in-circuit debugger as a programmer to program an actual (non-ICE/-<strong>ICD</strong>) device, i.e., a device not on a header board. Select “<strong>MPLAB</strong> <strong>ICD</strong> 3” fromProgrammer>Select Programmer and compile/assemble your application code withthe “Build Configuration” list box on the <strong>MPLAB</strong> IDE toolbar set to “Release”. Also, itmay be set by selecting Project>Build Configuration>Release.All debug features are turned off or removed when the debugger is used as aprogrammer. When using the Programmer>Program selection to program a device,<strong>MPLAB</strong> IDE will disable the in-circuit debug registers so the <strong>MPLAB</strong> <strong>ICD</strong> 3 in-circuitdebugger will program only the target application code and the Configuration bits (andEEPROM data, if available and selected) into the target device. The debug executivewill not be loaded. As a programmer, the debugger can only toggle the MCLR line toreset and start the target. A breakpoint cannot be set, and register contents cannot beseen or altered.The <strong>MPLAB</strong> <strong>ICD</strong> 3 in-circuit debugger system programs the target using ICSP. VPP,PGC and PGD lines should be connected as described previously. No clock is requiredwhile programming, and all modes of the processor can be programmed, includingcode protect, Watchdog Timer enabled and table read protect.2.9 RESOURCES USED BY THE DEBUGGERFor a complete list of resources used by the debugger for your device, please see theon-line help file in <strong>MPLAB</strong> IDE for the <strong>MPLAB</strong> <strong>ICD</strong> 3 in-circuit debugger.DS51766A-page 20© 2008 Microchip Technology <strong>In</strong>c.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!