Note the following details of the code protection feature on Microchip devices:
•Microchip products meet the specification contained in their particular Microchip Data Sheet.
•Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the
intended manner and under normal conditions.
•There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
•Microchip is willing to work with the customer who is concerned about the integrity of their code.
•Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as “unbreakable.”
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our
products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
Information contained in this publication regarding device
applications and t he lik e is provided only for your convenience
and may be su perseded by upda t es . It is y our responsibility to
ensure that your application meets with your specifications.
MICROCHIP MAKES NO REPRESENTATIONS OR
WARRANTIES OF ANY KIND WHETHER EXPRESS OR
IMPLIED, WRITTEN OR ORAL, STATUTORY OR
OTHERWISE, RELATED TO THE INFORMATION,
INCLUDING BUT NOT LIMITED TO ITS CONDITION,
QUALITY, PERFORMANCE, MERCHANTABILITY OR
FITNESS FOR PURPOSE. Microchip disclaims all liability
arising from this information and its use. Use of Microchip
devices in life supp ort and/or safety ap plications is entir ely at
the buyer’s risk, and the buyer agrees to defend, indemnify and
hold harmless M icrochip from any and all dama ges, claims,
suits, or expenses re sulting from such use. No licens es are
conveyed, implicitly or otherwise, under any Microchip
intellectual property rights.
Trademarks
The Microchip name and logo, the Microchip logo, Accuron,
dsPIC, K
EELOQ, KEELOQ logo, MPLAB, PIC, PICmicro,
PICSTART, rfPIC, SmartShunt and UNI/O are registered
trademarks of Microchip Tec hnology Incorporated in the
U.S.A. and other countries.
FilterLab, Linear Active Thermistor, MXDEV, MXLAB,
SEEVAL, SmartSensor and The Embedded Control Solutions
Company are registered trademarks of Microchip Technology
Incorporated in the U.S.A.
Analog-for-the-Digital Age, Application Maestro, CodeGuard,
dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN,
ECONOMONITOR, FanSense, In-Circuit Serial
Programmin g , IC SP, ICE P I C , M in d i , MiWi, MPASM, MPLAB
Certified logo, MPLIB, MPLINK, mTouch, PICkit, PICDEM,
PICDEM.net, PICtail, PIC
32
logo, PowerCal, PowerInfo,
PowerMate, PowerT ool, REAL ICE, rfLAB, Select Mode, Total
Endurance, WiperLock and ZENA are trademarks of
Microchip Technology In corporated 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.
Microchip received ISO/TS-16949:2002 certification for its worldwide
headquarters, design and wafer fabrication facilities in Chandler and
Tempe, Arizona; Gresham, Oregon and design centers in California
and India. The Company’s quality system processes and procedures
are for its PIC
devices, Serial EEPROMs, microperipherals, nonvolatile memory and
analog products. In addition, Microchip’s quality system for the design
and manufacture of development systems is ISO 9001:2000 certified.
All documentation becomes dated, and this manual is no exception. Microchip tools and
documentation are constantly evolving to meet customer needs, so some actual dialogs
and/or tool descriptions may differ from those in this document. Please refer to our web site
(www.microchip.com) to obtain the latest documentation available.
Documents are identified with a “DS” number. This number is located on the bottom of each
page, in front of the p age number. The numbering convention for the DS number is
“DSXXXXXA”, where “XXXXX” is the document number and “A” is the revision level of the
document.
For the most up-to-date information on development tools, see the MPLAB
Select the Help menu, and then Topics to open a list of available on-line help files.
INTRODUCTION
®
IDE on-line help.
This chapter contains general information that will be useful to know before using the
MPLAB ICD 3 in-circuit debugger. Items discussed in this chapter include:
• Document Layout
• Conventions Used in this Guide
• Warranty Registration
• Recommended Reading
• The Microchip Web Site
• Development Systems Customer Change Notification Service
• Customer Support
• Revision History
DOCUMENT LAYOUT
This document describes how to use the MPLAB ICD 3 in-circuit debugger as a
development tool to emulate and debug firmware on a target board, as well as how to
program devices. 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 debugger operation. Explains configuration options.
• Chapter 3. Ins tallation – How to install the debugger software and hardware.
• Chapter 4. General Setup – How to set up MPLAB IDE to use the debugger.
• Chapter 5. Tutorial – A brief tutorial on using the debugger.
• Chapter 6. Frequently Asked Questions (FAQs) – A list of frequently asked
questions, useful for troubleshooting.
• Chapter 7. Error Messa ges – A list of error messages and suggested
resolutions.
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.
• Chapter 9. Debugger Function Summary – A summary of debugger functions
available in MPLAB IDE when the MPLAB ICD 3 debugger is chosen as the
debug or program tool.
• Chapter 10. Hardware Specification – The hardware and electrical
specifications of the debugger system.
Please complete the enclosed Warranty Registration Card and mail it promptly.
Sending in the Warranty Registration Card entitles users to receive new product
updates. 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.
Please read this first! This document contains important information about operational
issues that should be considered when using the MPLAB ICD 3 with your target
design
Release Notes for MPLAB ICD 3 In-Circuit Debugger
For the latest information on using MPLAB ICD 3 in-circuit debugger, read the
“Readme for MPLAB ICD 3 Debugger.htm” file (an HTML file) in the Readmes
subdirectory of the MPLAB IDE installation directory. The release notes (Readme)
contains update information and known issues that may not be included in this user’s
guide.
Using MPLAB ICD 3 In-Circuit Debugger Poster (DS51765)
This poster shows you how to hook up the hardware and install the software for the
MPLAB ICD 3 in-circuit debugger using standard communications and a target board.
MPLAB ICD 3 In-Circuit Debugger On-line Help File
A comprehensive help file for the debugger is included with MPLAB IDE. Usage,
troubleshooting and hardware specifications are covered. This may be more up-to-date
than the printed documentation. Also, debugger reserved resources and limitations are
listed for various devices.
Header Board Specification (DS51292)
This booklet describes how to install and use MPLAB ICD 3 in-circuit debugger
headers. Headers are used to better debug selected devices using special -ICE device
versions without the loss of pins or resources.
Transition Socket Specification (DS51194)
Consult this document for information on transition sockets available for use with
MPLAB ICE 2000/4000 device adaptors, MPLAB ICD 2 headers and MPLAB ICD 3
in-circuit debugger headers.
Microchip provides online support via our web site at www.microchip.com. This web
site is used as a means to make files and information easily available to customers.
Accessible by using your favorite Internet browser, the web site contains the following
information:
• Product Support – Data sheets and errata, application notes and sample
programs, design resources, user’s guides and hardware support documents,
latest software releases and archived software
• General Technical Support – Frequently Asked Questions (FAQs), technical
support requests, online discussion groups, Microchip consultant program
member listing
• Business of Microchip – Product selector and ordering guides, latest Microchip
press releases, listing of seminars and events, listings of Microchip sales offices,
distributors and factory representatives
DEVELOPMENT SYSTEMS CUSTOMER CHANGE NOTIFICATION SERVICE
Microchip’s customer notification service helps keep customers current on Microchip
products. Subscribers will receive e-mail notification whenever there are changes,
updates, revisions or errata related to a specified product family or development tool of
interest.
To register, access the Microchip web site at www.microchip.com, click on Customer
Change Notification and follow the registration instructions.
The Development Systems product group categories are:
• Compilers – The latest info rmatio n on Microc hip C comp ilers, as semblers , linker s
and other language tools. These include all MPLAB C compilers; all MPLAB
assemblers (including MPASM™ assembler); all MPLAB linkers (including
MPLINK™ object linker); and all MPLAB librarians (including MPLIB™ object
librarian).
• Emulators – The latest information on Microchip in-circuit emulators.These
include the MPLAB REAL ICE™, MPLAB ICE 2000 and MPLAB ICE 4000
in-circuit emulators
• In-Circuit Debuggers – The latest information on the Microchip in-circuit
debuggers, the MPLAB ICD 2 in-circuit debugger and PICkit™ 2 debug express.
• MPLAB
Integrated Development Environment for development systems tools. This list is
focused on the MPLAB IDE, MPLAB IDE Project Manager, MPLAB Editor and
MPLAB SIM simulator, as well as general editing and debugging features.
• Programmers – The latest information on Microchip programmers. These include
the MPLAB PM3 and PRO MATE II device programmers and the PICSTART
Plus and PICkit 1 and 2 development programmers.
®
IDE – The latest information on Microchip MPLAB IDE, the Windows®
Users of Microchip products can receive assistance through several channels:
• Distributor or Representative
• Local Sales Office
• Field Application Engineer (FAE)
• Technical Support
Customers should contact their distributor, representative or field application engineer
(FAE) for support. Local sales offices are also available to help customers. A listing of
sales offices and locations is included in the back of this document.
Technical support is available through the web site at: http://support.microchip.com.
An overview of the MPLAB ICD 3 in-circuit debugger system is given.
• MPLAB ICD 3 In-Circuit Debugger Defined
• How the MPLAB ICD 3 In-Circuit Debugger Helps You
• MPLAB ICD 3 In-Circuit Debugger Kit Components
• Device and Feature Support
1.2MPLAB 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
MPLAB ICD 3 in-circuit debugger is an integral part of the development engineer's
toolsuite. The application usage can vary from software development to hardware
integration.
The MPLAB ICD 3 in-circuit debugger is a complex debugger system used for
hardware and software development of Microchip PIC
®
dsPIC
Programming™ (ICSP™) and Enhanced In-Circuit Serial Programming 2-wire serial
interfaces.
The debugger system will execute code like an actual device because it uses a device
with built-in emulation circuitry, instead of a special debugger chip, for emulation. All
available features of a given device are accessible interactively, and can be set and
modified by the MPLAB IDE interface.
The MPLAB ICD 3 debugger was developed for emulating embedded processors with
rich debug facilities which differ from conventional system processors in the following
aspects:
• Processors run at maximum speeds
• Capability to incorporate I/O port data input
In addition to debugger functions, the MPLAB ICD 3 in-circuit debugger system also
may be used as a development programmer.
Digital Signal Controllers (DSCs) that are based on In-Circuit Serial
A simplified description of how the MPLAB ICD 3 in-circuit debugger system works is
provided here. It is intended to provide enough information so a target board can be
designed that is compatible with the debugger for both emulation and programming
operations. The basic theory of in-circuit emulation and programming is described so
that problems, if encountered, are quickly resolved.
The MPLAB ICD 3 in-circuit debugger system is a next generation In-Circuit Debugger
(ICD) system. It differs from classical in-circuit emulator systems (e.g., MPLAB ICE
2000/4000) in a single, but important way: the production device and emulation device
are the same.
This is a great benefit since differences (errata) between the production silicon and
emulation silicon are eliminated. Additionally, as devices continue to operate at faster
speeds, traditional emulator systems present bottlenecks caused by internal busses
that must be carried off-chip to external memories and cannot offer full speed
emulation.
Another significant benefit is that there is no lead time between production silicon and
emulation silicon. Further, a problem encountered on a production board can be easily
debugged without having to install transition sockets and dealing with complicated
cabling systems and setups to have access to the application.
2.3MPLAB 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:
The debugger system configurations are discussed in the following sections.
CAUTION
Do not connect the hardware before installing the software and USB drivers. Also, do
not change hardware connections when the pod or target is powered.
Standard ICSP Device Communication
The debugger system can be configured to use standard ICSP communication for both
programming and debugging functions. This 6-pin connection is the same one used by
the MPLAB ICD 2 in-circuit debugger.
The modular cable can be either (1) inserted into a matching socket at the target, where
the target device is on the target board (Figure 2-1), or (2) inserted into a standard
adapter/header board combo (available as a Processor Pak), which in then plugged
into the target board (Figure 2-2).
Note:Older header boards used a 6-pin (RJ-11) connector instead of an 8-pin
connector, so these headers may be connected directly to the debugger.
For more on standard communication, see Chapter 10. “Hardware Specification”.
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.
Note:Cable connections at the debugger and target are mirror images of each
other, i.e., pin 1 on one end of the cable is connected to pin 6 on the other
end of the cable. See Section 10.6.2.3 “Modular Cable Specification”.
Figure 2-4 shows the interconnections of the MPLAB ICD 3 in-circuit debugger to the
connector on the target board. The diagram also shows the wiring from the connector
to a device on the target PC board. A pull-up resistor (usually around 10 kΩ) is
recommended to be connected from the V
strobed low to reset the device.
PP/MCLR line to VDD so that the line may be
MPLAB® ICD 3 In-Circuit Debugger User’s Guide
V
DD
VPP/MCLR
PGC
PGD
V
SS
AV
DD
AV
SS
2
1
5
4
3
User Reset
4.7K-10K
Interface
Connector
Application
PC Board
Device
FIGURE 2-4:STANDARD CONNECTION TARGET CIRCUITRY
2.5.3Target Powered
In the following descriptions, only three lines are active and relevant to core debugger
operation: pins 1 ( V
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.
In this configuration, target V
the target low voltage operation. If the debugger does not sense voltage on its V
(pin 2 of the interface connector), it will not operate.
PP/MCLR), 5 (PGC) and 4 (PGD). Pins 2 (VDD) and 3 (VSS) are
DD is sensed by the debugger to allow level translation for
DD line
2.5.4Debugger Powered
The internal debugger power is limited in two aspects: (1) the voltage range is not as
wide (3-5V); and (2) the amount of current it can supply is limited to 100 mA. This may
be of benefit for very small applications that have the device V
rest of the application circuit for independent programming, but is not recommended for
general usage as it imposes more current demands from the USB power system
derived from the PC.
Be aware that the target V
DD is sensed by the debugger to allow level translation for
target low-voltage operation. If the debugger does not sense voltage on its V
2 of the interface connector), it will not operate.
Not all devices have the AV
DD and AVSS lines, but if they are present on the target
device, all must be connected to the appropriate levels in order for the debugger to
operate.
In general, it is recommended that all V
the appropriate levels. Also, devices with a V
DD/AVDD and VSS/AVSS lines be connected to
CAP line (PIC18FXXJ for example) should
be connected to the appropriate capacitor or level.
Note:The interconnection is very simple. Any problems experienced are often
caused by other connections or components on these critical lines that
interfere with the operation of the MPLAB ICD 3 in-circuit debugger system,
as discussed in the following section.
DD separated from the
DD line (pin
Theory of Operation
No!
No!
No!
No!
VPP/MCLR
PGC
PGD
1
5
4
Interface
Connector
2.5.5Circuits That Will Prevent the Debugger From Functioning
Figure 2-5 shows the active debugger lines with some components that will prevent the
MPLAB ICD 3 in-cir cu it debu gge r sy st em from func tio nin g.
FIGURE 2-5:IMPROPER CIRCUIT COMPONENTS
Specifically, these guidelines must be followed:
• Do not use pull-ups on PGC/PGD – they will disrupt the voltage levels, since
these lines have 4.7 kΩ pull-down resistors in the debugger.
• Do not use capacitors on PGC/PGD – they will prevent fast transitions on data
and clock lines during programming and debug communications.
• Do not use capacitors on MCLR
simple pull-up resistor is generally sufficient.
• Do not use diodes on PGC/PGD – they will prevent bidirectional communication
between the debugger and the target device.
– they will prevent fast transitions of VPP. A
2.6DEBUGGING 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. 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. Using the debugger to set breakpoints and run.
If the target device cannot be programmed correctly, the MPLAB ICD 3 in-circuit
debugger will not be able to debug.
Figure 2-6 shows the basic interconnections required for programming. Note that this
is the same as Figure 2-4, but for the sake of clarity, the V
debugger are not shown.
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
programming levels on V
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.
PP/MCLR, sends clock pulses on PGC and serial data via
2.7REQUIREMENTS FOR DEBUGGING
To debug (set breakpoints, see registers, etc.) with the MPLAB ICD 3 in-circuit
debugger system, there are critical elements that must be working correctly:
• The debugger must be connected to a PC. It must be powered by the PC via the
USB cable, and it must be communicating with the MPLAB IDE software via the
USB cable. See Chapter 3. “Installation” for details.
• The debugger must be connected as shown to the V
target device with the modular interface cable (or equivalent). V
also required to be connected between the debugger and target device.
• The target device must have power and a functional, running oscillator. If the
target device does not run, for any reason, the MPLAB ICD 3 in-circuit debugger
cannot debug.
• The target device must have its configuration words programmed correctly:
- The oscillator Configuration bits should correspond to RC, XT , etc., depending
upon the target design.
- For some devices, the Watchdog Timer is enabled by default and needs to be
disabled.
- The target device must not have code protection enabled.
- The target device must not have table read protection enabled.
• LVP should be disabled.
Once the above conditions are met, you may proceed to the following:
• Sequence of Operations Leading to Debugging
• Debugging Details
2.7.1Sequence of Operations Leading to Debugging
Given that the Requirements For Debugging are met, these actions can be performed
when the MPLAB ICD 3 in-circuit debugger is set as the current debugger from the
MPLAB IDE menu (Debugger>Select Tool>MPLAB ICD 3
• The application code is compiled/assembled by selecting Project>Build
• When Debugger>Program
the device’s memory via the ICSP protocol as described above.
• A small “debug executive” program is loaded into the high area of program
memory of the target device. Since the debug executive must reside in program
memory, the application program must not use this reserved space. Some devices
have special memory areas dedicated to the debug executive. Check your device
data sheet for details.
• Special “in-circuit debug” registers in the target device are enabled. These allow
the debug executive to be activated by the debugger.
• The target device is held in Reset by keeping the V
2.7.2Debugging Details
Figure 2-7 illustrates the MPLAB ICD 3 in-circuit debugger system when it is ready for
debugging.
is selected, the application code is programmed into
PP/MCLR line low.
FIGURE 2-7:MPLAB
®
ICD 3 IN-CIRCUIT DEBUGGER READY FOR
DEBUGGING
Typically , in order to find out if an application program will run correctly, a breakpoint is
set early in the program code. When a breakpoint is set from the user interface of
MPLAB IDE, the address of the breakpoint is stored in the special internal debug
registers of the target device. Commands on PGC and PGD communicate directly to
these registers to set the breakpoint address.
Next, the Debugger>Run
from MPLAB IDE. The debugger will then tell the debug executive to run. The target
will start from the Reset vector and execute until the Program Counter reaches the
breakpoint address previously stored in the internal debug registers.
After the instruction at the breakpoint address is executed, the in-circuit debug
mechanism of the target device “fires” and transfers the device’s Program Counter to
the debug executive (much like an interrupt) and the user’s application is effectively
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.
function or the Run icon (forward arrow) is usually pressed
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 MPLAB ICD 3
in-circuit 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.8PROGRAMMING 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
the “Build Configuration” list box on the MPLAB IDE toolbar set to “Release”. Also, it
may be set by se lecting 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
MPLAB IDE will disable the in-circuit debug registers so the MPLAB ICD 3 in-circuit
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
reset and start the target. A breakpoint cannot be set, and register contents cannot be
seen or altered.
The MPLAB ICD 3 in-circuit debugger system programs the target using ICSP. V
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 protect, Watchdog Timer enabled and table read protect.
and compile/assemble your application code with
.
selection to program a device,
line to
PP,
2.9RESOURCES 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 MPLAB ICD 3 in-circuit debugger.
How to install the MPLAB ICD 3 in-circuit debugger system is discussed.
• Installing the Software
• Installing the USB Device Drivers
• Connecting the Target
• Setting Up the Target Board
• Setting Up MPLAB IDE
3.2INSTALLING THE SOFTWARE
To install the MPLAB IDE software, first acquire the latest MPLAB IDE installation
executable (MPxxxxx.exe, where xxxxx represents the version of MPLAB IDE) from
either the Microchip web site (www.microchip.com) or the MPLAB IDE CD-ROM
(DS51123). Then run the executable and follow the screens to install MPLAB IDE.
Note:MPLAB IDE v8.15 or greater is required to use the MPLAB ICD 3 in-circuit
debugger.
MPLAB® ICD 3 IN-CIRCUIT
DEBUGGER USER’S GUIDE
3.3INSTALLING THE USB DEVICE DRIVERS
Installing MPLAB IDE will preinstall the USB device drivers for the MPLAB ICD 3
in-circuit debugger. Therefore, once you have installed MPLAB IDE, connect the
debugger to the PC with a USB cable and follow the Windows “New Hardware Wizard”
to automatically install the drivers.
Expanded USB device driver installation instructions may found at:
MPLAB IDE installation directory\ICD 3\Drivers\ddri.htm
Note:If a new MPLAB ICD 3 is connected to your PC, you will need to reinstall
A connection is built-in to select the type of communication with the target. See
Section 2.4 “Debugger To Target Communication” for more details and a diagram.
1. Plug in the USB/power cable if not already connected.
2. Attach the communication cable(s) between debugger and target.
FIGURE 3-1:INSERT COMMUNICATIONS AND USB/POWER CABLES
3.5SETTING UP THE TARGET BOARD
The target must be set up for the type of target device to be used.
3.5.1Using Production Devices
For production devices, the debugger may be connected directly to the target board.
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 Debugge r Enab le ” Configuration bit.
Note:In the future, devices with circuitry that support ICD may be used.
The target board must have a connector to accommodate the communications chosen
for the debugger. For connection information, see Section 2.4 “Debugger To Target
For ICE devices, an ICE header board is required. The header board contains the
hardware necessary to emulate a specific device or family of devices. For more
information on ICE headers, see the “Header Board Specification” (DS51292).
Note:In the future, ICD header boards with ICD devices (Device-ICD) may be
A transition socket is used with the ICE header to connect the header to the target
board. Transition sockets are available in various styles to allow a common header to
be connected to one of the supported surface mount package styles. For more
information on transition sockets, see the “Transition Socket Specification” (DS51 194).
Header board layout will be different for headers or processor extension packs. For
connection information, see Section 2.4 “Debugger To Target Communication”,
“Standard ICSP Device Communication”.
3.5.3Powering the Target
There are a couple of configurations for powering MPLAB ICD 3 and the target.
These are configuration essentials:
• When using the USB connection, MPLAB ICD 3 can be powered from the PC but
it can only provide a limited amount of current, up to 100 mA, at V
a small target board.
• The desired method is for the target to provide V
voltage range from 2-5V. The additional benefit is that plug-and-play target
detection facility is inherited, i.e., MPLAB IDE will let you know in the Output
window when it has detected the target and has detected the device.
Note:The target voltage is only used for powering up the drivers for the ICSP
interface; the target voltage does not power up the MPLAB ICD 3. The
MPLAB ICD 3 system power is derived strictly from the USB port.
DD as it can provide a wider
DD from 3-5V t o
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 pow er the
target. If you are powering the target through the MPLAB ICD 3, see
Section 9.5.8 “Settings Dialog, Power Tab” for instructions.
3.6SETTING UP MPLAB IDE
Once the hardware is connected and powered, MPLAB IDE may be set up for use with
the MPLAB ICD 3 in-circuit debugger.
On some devices, you must select the communications channel in the Configuration
bits, e.g., PGC1/EMUC1 and PGD1/EMUD1. Make sure the pins selected here are the
same ones physically connected to the device.
For more on setting up a project and getting started with MPLAB ICD 3, see Chapter
4. “General Setup”.
To walk through the process of programming and debugging a device with the MPLAB
ICD 3, see Chapter 5. “Tutorial”.