Page 2
PowerMate, PowerTool, REAL ICE, rfLAB, Select Mode, Total Endurance, WiperLock and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. All other trademarks mentioned herein are property of their respective companies.
The document is organized as follows: Part 1 – Getting Started • Chapter 1. Overview – What the MPLAB ICD 3 in-circuit debugger is, and how it can help you develop your application. • Chapter 2. Theory of Operation – The theory of MPLAB ICD 3 in-circuit debug- ger operation.
Page 8
Part 3 – Reference • Chapter 8. Basic Debug Functions – A description of basic debugger features available in MPLAB IDE when the MPLAB ICD 3 in-circuit debugger is chosen as either the debug or programming tool. This includes the debug features breakpoints, stopwatch, triggering and real-time watches.
Page 10
Interim software releases are available at the Microchip web site. RECOMMENDED READING This user's guide describes how to use MPLAB ICD 3 in-circuit debugger. Other useful documents are listed below. The following Microchip documents are available and recommended as supplemental reference resources.
• MPLAB ICD 3 In-Circuit Debugger Kit Components • Device and Feature Support MPLAB ICD 3 IN-CIRCUIT DEBUGGER DEFINED The MPLAB ICD 3 in-circuit debugger is an in-circuit debugger that is controlled by a ® PC running MPLAB IDE (v8.15 or greater) software on a Windows platform.
2. USB cable to provide communications between the debugger and a PC and to provide power to the debugger 3. Cable (also MPLAB ICD 2 compatible) to connect the MPLAB ICD 3 to a header module or target board 4. MPLAB IDE Quick Start Guide (DS51281) 5.
MPLAB ICD 3 IN-CIRCUIT DEBUGGER VS. MPLAB ICD 2 DEBUGGER The MPLAB ICD 3 in-circuit debugger system is similar in function to the MPLAB ICD 2 in-circuit debugger system, but surpasses it in speed and functionality. The MPLAB ICD 3 also: •...
2.5.1 Standard Communication Target Connection Using the RJ-11 connector, the MPLAB ICD 3 in-circuit debugger is connected to the target device with the modular interface (six conductor) cable. The pin numbering for the connector is shown from the bottom of the target PC board in Figure 2-3.
Page 22
) and 3 (V ) are shown on Figure 2-4 for completeness. MPLAB ICD 3 has two configurations for powering the target device: internal debugger and external target power. The recommended source of power is external and derived from the target application.
DEBUGGING WITH THE DEBUGGER There are two steps to using the MPLAB ICD 3 in-circuit debugger 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.
4.7 kΩ 4.7 kΩ A simplified diagram of some of the internal interface circuitry of the MPLAB ICD 3 in-circuit debugger is shown. For programming, no clock is needed on the target device, but power must be supplied. When programming, the debugger puts...
• The target device is held in Reset by keeping the V /MCLR line low. 2.7.2 Debugging Details Figure 2-7 illustrates the MPLAB ICD 3 in-circuit debugger system when it is ready for debugging. ® FIGURE 2-7: MPLAB...
PROGRAMMING WITH THE DEBUGGER Use the MPLAB ICD 3 in-circuit debugger as a programmer to program an actual (non -ICE/-ICD) device, i.e., a device not on a header board. Select “MPLAB ICD 3” from Programmer>Select Programmer and compile/assemble your application code with...
The device on the target board must have built-in debug circuitry in order for the MPLAB ICD 3 in-circuit debugger to perform emulation with it. Consult the device data sheet to see if the device has the needed debug circuitry, i.e., it should have a “Background Debugger Enable”...
MPLAB ICD 3 system power is derived strictly from the USB port. If you have not already done so, connect the MPLAB ICD 3 to the target using the appropriate cables (see Section 3.4 “Connecting the Target”). Then power the target.
ICD 3 IN-CIRCUIT DEBUGGER USER’S GUIDE Chapter 4. General Setup INTRODUCTION How to get started using the MPLAB ICD 3 in-circuit debugger is discussed. • Starting the MPLAB IDE Software • Creating a Project • Viewing the Project • Building the Project •...
Note: On the Project Manager toolbar (View>Toolbars>Project Manager), select “Debug” from the drop-down list when using the MPLAB ICD 3 as a debugger, or select “Release” when using it as a programmer. When done, choose Project>Build All to build the project.
Before beginning this tutorial, follow the steps in Chapter 3. “Installation” to set up the MPLAB IDE software and MPLAB ICD 3 system hardware. Double click on the MPLAB IDE icon to launch the application. Once launched, the MPLAB IDE desktop should appear.
CONFIGURATION BITS WINDOW 5.6.2 Selecting the Debugger as a Debugger To select MPLAB ICD 3 in-circuit debugger as a debugger, select Debugger>Select Tool>ICD 3. Then: 1. The Output window will open to display connection information. Depending on the version of MPLAB IDE or the device selected, a message box may appear indicating that the firmware needs to be updated.
(recommended) or you may select ranges manually. • The “Memories” section should have “Program” checked, and “EEPROM” and “ID” unchecked. When using the MPLAB ICD 3 in-circuit debugger as a debugger, Configuration bits will always be programmed and the “Configuration” box will be checked and grayed out.
Note: The debug executive code is automatically programmed in upper program memory for MPLAB ICD 3 debug functions. Debug code must be programmed into the target device to use the in-circuit debugging capabilities of the MPLAB ICD 3 in-circuit debugger.
ICD 3 In-Circuit Debugger User’s Guide 5.10 RUNNING DEBUG CODE The MPLAB ICD 3 in-circuit debugger executes in Real Time or in Step mode. • Real Time execution occurs when the device is put in the MPLAB IDE’s Run mode.
To program the application follow these steps: 1. Disable the MPLAB ICD 3 in-circuit debugger as the debug tool by selecting Debugger>Select Tool>None. 2. Enable the MPLAB ICD 3 in-circuit debugger as the programmer by selecting Programmer>Select Programmer>ICD 3.
• How Does It Work • What’s Wrong HOW DOES IT WORK • What's in the silicon that allows it to communicate with the MPLAB ICD 3 in-circuit debugger? MPLAB ICD 3 in-circuit debugger can communicate with Flash silicon via the ICSP interface.
Mb/sec limit. • Will this slow down the running of the program? There is no cycle stealing with the MPLAB ICD 3 in-circuit debugger. The output of data is performed by the state machine in the silicon. • Is it possible to debug a dsPIC DSC running at any speed? The MPLAB ICD 3 is capable of debugging at any device speed as specified in the device’s data sheet.
• Specific Error Messages • General Corrective Actions SPECIFIC ERROR MESSAGES MPLAB ICD 3 in-circuit debugger error messages are listed below in numeric order. Note: Numbers may not yet appear in displayed messages. Use the Search tab on the Help viewer to find your message and highlight it below.
Page 61
3. Check that the target speed is entered on the Clock tab of the Settings dialog. 4. Run again. ICD3Err0045: You must connect to a target device to use MPLAB ICD 3. No power has been found. 1. Ensure V and GND are connected between the debugger and target.
6. Ensure that the cables used are of the correct length. 7.3.2 Debugger-to-Target Communication Error Actions The MPLAB ICD 3 in-circuit debugger and the target device are out-of-sync with each other. 1. Select Reset and then try the action again.
Page 64
6. Make sure the USB drivers are loaded. 7.3.6 Debug Failure Actions The MPLAB ICD 3 in-circuit debugger was unable to perform a debugging operation. There are numerous reasons why this might occur. Top Reasons Why You Can’t Debug 1. The oscillator is not working. Check your Configuration bits setting for the oscillator.
Page 65
4. Microchip Technology Inc. offers myriad demonstration boards to support most of its microcontrollers. Consider using one of these applications, which are known to work, to verify correct MPLAB ICD 3 in-circuit debugger functionality. Or, use the self-test board to verify the debugger itself (Section 10.7 “ICD 3 Test Interface Board”.)
ICD 3 IN-CIRCUIT DEBUGGER USER’S GUIDE Chapter 8. Basic Debug Functions INTRODUCTION Basic MPLAB ICD 3 in-circuit debugger debug functions of breakpoints and stopwatch are discussed. BREAKPOINTS Use breakpoints to halt code execution at specified lines in your code. Breakpoints and triggers use the same resources. Therefore, the available number of breakpoints is actually the available number of combined breakpoints/triggers.
• Programming Functions • Settings Dialog DEBUGGING FUNCTIONS When you select the MPLAB ICD 3 from the Debugger menu, the following items will be added to the MPLAB IDE functions: • Debugger Menu – additional options are added to the drop-down menu •...
Page 72
Abort any programming operation (e.g., program, read, etc.). Terminating an operation will leave the device in an unknown state. Reconnect Attempt to re-establish communications between the PC and the MPLAB ICD 3 in-circuit debugger. The progress of this connection is shown on the ICD 3 tab of the Output dialog.
Page 73
Center the current PC line in the window. 9.2.3 Toolbars/Status Bar When the MPLAB ICD 3 in-circuit debugger is selected as a debugger, these toolbars are displayed in MPLAB IDE: • Basic debug toolbar (Run, Halt, Animate, Step Into, Step Over, Step Out, Reset).
Debugger Function Summary PROGRAMMING FUNCTIONS When you select the MPLAB ICD 3 in-circuit debugger from the Programmer menu, program items will be added to the following MPLAB IDE functions: • Programmer Menu • Toolbars/Status Bar 9.4.1 Programmer Menu Program Program specified memory areas: program memory, Configuration bits, ID locations and/or EEPROM data.
Settings Dialog, Program Memory Tab This tab allows you to set up debug/programming options. • Allow MPLAB ICD 3 to select memories and ranges – the debugger uses your selected device and default settings to determine what to program. • Manually select memories and ranges – you select the type and range of memory to program.
Page 82
To select all peripherals, including “All Other Peripherals”, click Check All. To deselect all peripherals, including “All Other Peripherals”, click Uncheck All. 9.5.4 Settings Dialog, Status Tab View the status of your MPLAB ICD 3 system on this tab. TABLE 9-8: STATUS ITEMS Versions Firmware Suite Version Debugger firmware suite version.
Page 83
9.5.7 Settings Dialog, Warnings Tab A list of all MPLAB ICD 3 in-circuit debugger warnings are displayed on this tab. • Check a warning to enable it. The warning will be displayed in the Output window. • Uncheck a warning to disable it.
Important Information Concerning the Use of the MPLAB ICD 3 In-Circuit Debugger Due to the special nature of the MPLAB ICD 3 in-circuit debugger, the user is advised that it can generate higher than normal levels of electromagnetic radiation which can interfere with the operation of all kinds of radio and other equipment.
ICD 3 In-Circuit Debugger User’s Guide 10.4 USB PORT/POWER The MPLAB ICD 3 in-circuit debugger is connected to the host PC via a Universal Serial Bus (USB) port, version 2.0 compliant. The USB connector is located on the side of the pod.
The actual power comes from the MPLAB ICD 3 in-circuit debugger system as the V sense line is used as a reference only to track the target voltage. The V connection is isolated with an optical switch.
MODULAR PLUG SPECIFICATION • Manufacturer, Part Number – AMP Incorporated, 5-554710-3 • Distributor, Part Number – Digi-Key, A9117ND 10.6.2.3 MODULAR CABLE SPECIFICATION • Manufacturer, Part Number – Microchip Technology, 07-00024 8.00” Pin 1 Pin 6 10.7 ICD 3 TEST INTERFACE BOARD This board can be used to verify that the debugger is functioning properly.
From PC 3. Connect the debugger to the PC. 4. Select the MPLAB ICD 3 in-circuit debugger as either a debugger or programmer in MPLAB IDE. 5. MPLAB IDE will invoke and run the complete self-test and give you a status (pass/fail).
Page 93
The MPLAB ICE 2000 and MPLAB ICE 4000 debugger systems include the pod, pro- cessor module, device adapter, target board, cables, and MPLAB IDE software. The MPLAB ICD 3 system consists of a pod, a driver (and potentially a receiver) card, target board, cables, and MPLAB IDE software.
Page 95
A language for writing programs that is further removed from the processor than assembly. In-Circuit Debugger. MPLAB ICD 2 is Microchip’s in-circuit debugger. In-Circuit Debugger. MPLAB ICE 2000, MPLAB ICE 4000 and MPLAB ICD 3 system are Microchip’s in-circuit debuggers. ICSP In-Circuit Serial Programming.
Page 97
Mnemonics Text instructions that can be translated directly into machine code. Also referred to as opcodes. MPASM™ Assembler Microchip Technology’s relocatable macro assembler for PIC microcontroller devices, ® KeeLoq devices and Microchip memory devices. MPLAB ASM30 Microchip’s relocatable macro assembler for dsPIC digital signal controller and PIC24...
Page 98
MPLAB IDE software. MPLAB ICE 4000 Not recommended for new designs. See the MPLAB ICD 3 in-circuit debugger. Microchip’s in-circuit debugger that works with MPLAB IDE. MPLAB ICE 4000 supports PIC18F and PIC24 MCUs and dsPIC DSCs. The main component of each ICE is the pod.
Page 100
Several plug-in tools may be found under the Tools menu. MPLAB ICD 3 system: The box that contains the emulation control circuitry for the ICE device on the header or target board. An ICE device can be a production device with built-in ICE circuitry or a special ICE version of a production device (i.e., device-ICE).
Need help?
Do you have a question about the MPLAB ICD 3 and is the answer not in the manual?
Questions and answers