ICD2 Troubleshooting
ICD2 Troubleshooting
Some MPLAB ICD 2 units that are returned that have no problems. Before reporting a problem with
your unit, please check these common issues. For more detailed troubleshooting, more information
follows.
Common MPLAB ICD 2 Problems That You Should Consider Before Contacting
Technical Support
What device are you working with?
If the device shows “yellow light” support in your
version, often an upgrade to a newer version of
MPLAB will provide “green light” support. “Yellow
light” indicates early release, and later releases may
address issues that you are encountering. Check to
see the latest version of MPLAB at
www.microchip.com/mplab.
Are you using a Microchip demo board or your
own design?
Microchip demo and evaluation boards have properly
designed interfaces for MPLAB ICD 2. Make certain
you followed the guidelines for resistors/capacitors on
the MPLAB ICD 2 communications connections (in
manual and on the poster).
Is the target powered or are you powering from the
MPLAB ICD 2?
Best results are with target power, since MPLAB ICD 2
can supply only a limited amount of current.
Remember: MPLAB ICD 2 relies upon a target properly executing code and communicating through
the interface to function. In order for this low-cost debugger to be effective, building the project,
setting the proper configuration bits, and effective communications protocols must be understood in
the design of the target circuit and in the use of the MPLAB IDE and its software suite of tools. Read
Chapter 6 in the MPLAB ICD 2 In-Circuit Debugger User’s Guide (DS-51331) for more information
on the hardware and software resources that are required for MPLAB ICD 2 to communicate with the
PC.
You can use this flow chart or look at the items below to help diagnose problems.
Here are some common problems that have been encountered using MPLAB ICD 2 and some tips for
fixing them:
MPLAB ICD 2 Driver Issues
MPLAB ICD 2 Connection Issues
Invalid Device ID
Watch Window
MPLAB IDE Installation with MPLAB ICD 2
Other Errors
MPLAB ICD 2 Does Not Work in Programming Mode
Programming/Verification Failed
MPLAB ICD 2 Debug Mode Issues
Resolution: Check that you do not have MPLAB ICD 2 connected to a powered target board when you
plug it into the USB port. This can sometimes result in an invalid ID because the USB interface chip is
partially powered.
Try disconnecting both the USB cable and the target board cable, and then connect the USB cable again.
If that does not help, remove and reinstall the USB drivers. You can use MPUsbClean.exe to remove the
driver and MPUsbIRU.exe to preinstall the driver prior to plugging in MPLAB ICD 2.
C:\Program Files\Microchip\MPLAB IDE\Utilities\MPUsbClean\MPUsbClean.exe
C:\Program Files\Microchip\MPLAB IDE\Utilities\MPUsbIRU\MPUsbIRU.exe
When you connect MPLAB ICD 2 to the USB port, ensure that Windows does not select a driver file that is
named OEMxx.INF. The correct files are MPLAB ICD 2W2KL.INF and MPLAB ICD 2W2K.INF, or
something similar depending on your operating system.
2. After a few hours in use, the PC cannot recognize MPLAB ICD 2. If the USB cable is disconnected then
reconnected, the PC says that it senses a new device but cannot find the driver.
Resolution: The PC may be configured to put the USB port to sleep when it goes idle.
Go to the PC's Device Manager, and check the Properties of the USB Root Hub that MPLAB ICD 2 is
attached to. Click on the "Power Management" tab and make sure the checkbox to turn off the USB hub is
NOT checked.
Make sure when connecting MPLAB ICD 2 to the USB port that the power supply is not connected. MPLAB
ICD 2 may not enumerate properly if a power supply is connected first, causing the Device Manager to
appear.
3. Unable to install the driver for MPLAB ICD 2 in Win XP Home Edition. Both ways have been tried:
Include this location ...: C:\Program Files\MPLAB IDE\DriversXP\ MPLAB ICD 2_USB.
This results in this error: - "The wizard could not find the software on your computer".
Don't Search. I will ... This yields this error: - "The Specified location does not contain
information about your hardware".
Resolution: Be sure you aren't connecting the USB through an un-powered hub, and that MPLAB ICD 2
doesn't have a separate power supply connected, as this can cause installation/enumeration problems.
Also, read the .htm file in your Program Files/Microchip/MPLAB IDE/ICD2/Drivers folder.
This gives exact installation instructions. Also check the device manager to see if an unknown USB device
is shown under "Other Devices" and remove this.
4. When installing, there is a message that the drivers are not found, even though they are in the driver
folders, and the driver wizard is pointed to the correct folder?
Resolution: This problem can be solved by exiting from the driver install wizard, and going to the control
panel “Add New Hardware” selection. After the system searches for new hardware, choose, “No, the
device isn’t in the list.” Then choose “No, I want to select the hardware from a list.” And when the
Have Disk… button appears, browse to the driver folder in the Program Files/Microchip/MPLAB
IDE/ICD2/Drivers folder and select the proper driver.
Table of Contents
MPLAB ICD 2 Connection Issues:
1. Can't establish communications to MPLAB ICD 2.
Resolution: Is MPLAB ICD 2 power light on? The LED should shine brightly. If it is dim, you may need to
connect the power supply. The RS-232 connection from the PC cannot supply power to MPLAB ICD 2, but
a USB connection can. Note that some USB hubs cannot supply power. Check the on-line help for current
troubleshooting hints.
Are the USB drivers installed properly? MPLAB ICD 2 USB driver should be visible in the Windows Device
Manager dialog. Some USB hubs cannot supply power to the attached USB devices. A power supply will
need to be connected to MPLAB ICD 2 with these hubs.
Table of Contents
Watch Window:
1. When using the MPLAB C30 C compiler with MPLAB ICD 2 and adding a variable to the watch window, the
locations are stated to be reserved memory.
Resolution: Make sure that the "Link for MPLAB ICD 2" check box is checked in the linker build options.
Table of Contents
Other Errors:
1. MPLAB ICD 2 issues a warning (ICDWarn0033).
Resolution: This error may result when programming a device configured for internal MCLR and the
internal oscillator. This mode is selected by the associated device configuration bits.
When Internal MCLR is used with MPLAB ICD 2 for programming, both Vpp and Vdd are powered
together, and then Vpp is pulled high to Vihh to enter programming mode. This means that code will be
running before Vpp goes to Vihh. If that code makes use of port pins that correspond to Clock and Data
pins in programming mode, there is a chance their values may not be 0, as necessary to enter
programming mode. Therefore, the device could not be reprogrammed.
Click OK to continue programming or click Cancel to cancel the programming operation.
Work-Around:
When External MCLR is configured, this is not a problem, as Vpp can go directly to Vihh. Also, if External
Oscillator is configured, the external oscillator can be kept from running, thus keeping the code from
running until Vpp is at Vihh.
Table of Contents
Programming/Verification Failed:
1. MPLAB ICD 2 gets a failed message after programming.
Resolution: Check PGC, PGD and VPP connections and voltages. Make sure the target PICmicro MCU
has power applied. If the target PIC MCU has AVss and AVdd pins, verify that these are all connected
properly. They must not be allowed to float unconnected.
2. The boot code protection and write boot protection are enabled. When programming is attempted, read or
verify, the answer is still 'Verify failed' (all positions read as '0'). The target operates with a supply of 2.8V.
Resolution: To disable the protection bits, MPLAB ICD 2 may need to do a bulk-erase, which requires
higher voltage than 2.8V, typically 4.5V or higher (check the programming specification for the correct
data). Try changing to "Power target circuit from MPLAB ICD 2 (5V)" in the setup configuration. Use this
method to erase or later program the chip. After that, switch back to "target has its own power supply" and
program/erase/play as usual (until you set the protection mode/bits again and then need to set "Power
target circuit from MPLAB ICD 2" to program).
Table of Contents