Overview

What is the ICD?

The In Circuit Debugger allows for easy downloading and optional debugging of programs for certain micro controllers. The ICD does not work with all chips. The chip must have ICSP for programming support and ICD capability for debugging support. See http://www.ccsinfo.com/icddevices.shtml for a list of all supported chips.

The ICD connects to the micro controller via MCLR, B7, B6 and B3. Using B6 and B7, the ICD can download programs and communicate with a debug module in the micro controller. Connecting B3 is optional, it is used for the debug monitor in PCW. If B3 is connected, do not use it in a program being debugged. If port B is used in a program, keep pin-three high. If B3 is optionally not connected keep it pulled high.

When debugging certain RAM and ROM locations, one stack location and the B6,B7 pins are used during program execution.

The ICD modules, with the exception of the ICD-U40, are powered by the target board.

The ICD software has the capability to download to the target and to update its own firmware. In order to debug, a separate debugger like PCW or PCWH must be used.

ICD Types

There are two basic types of ICD models, ICD-S and ICD-U. The ICD-S connects to the PC through a serial port. The ICD-U connects to the PC through a USB port. Each ICD has a label that says either ICD-S or ICD-U.

Also, there are different types of ICD-S and ICD-U modules.

There is the original ICD-S. It has the ICD-S label and no sticker on the back. The ICD-S3V is the original ICD-S but it also can be powered with 3V. The ICD-S3V has a LF 3V sticker on the back. The ICD-S20 runs at 20Mhz and has a 20Mhz sticker on the back. The ICD-S40 runs at 40 MHz.All the ICD-S needs to powered from the target. Excpt for ICD-S3V all the others needs to be powered at 5V and the ICD-S3v needs to be powered at 3v.

The original ICD-U runs at 20Mhz and does not have a sticker on the back. The ICD-U40 runs at 40Mhz and has a 40MHZ sticker on the back.The ICD-U needs to be powered from the target at 5V and the ICD-U40 is powered from the usb. Therefore ICD-U40 can be used for programming/debugging targets at low voltages(3V). The ICD0U40 can also power the target at 5V by closing the jumper near the icd jack with a shunt. This operation requires opening the icd box.

CCS only manufactures ICD-S40 and ICD-U40 but supports all the old ICD types with new firmware revisions.


Program Window

The program window is the main window of the ICD program and provides these options:

  • burn the target chip

  • run and halt the program

  • test the icd and the target connections

  • update the icd firmware

  • set up and check the port connections

  • Burning the chip

It also displays the icd sofware version on the title bar and the icd firmware version on the bottom status bar. The detected chip is displayed on the bottom status bar and well as the com port connected to and baud rate.


Burning a chip

Click the Download To Target button in the ICD software to download a HEX or COFF file to the target.

The ICD software will download the program and, if in the file, data EEPROM data. The previous contents of memory are erased based on the current erase mode. The memory contents are verified and the configuration word from the file will be programmed. If the DEBUG flag is enabled in the configuration word, it is disabled by the ICD since the ICD software may not be used for debugging.


Running and halting a program

The Run Program button will release the MCLR so the target program may run. The ICD will not interfere with B6 or B7 after the program is started.

The button changes to Stop Program when the program is running and pressing this button will again assert MCLR.


Updating firmware

The ICD ships with CCS firmware installed. The firmware contains a bootloader that allows for user firmware upgrades. The current firmware is located in the same directory as ICD.EXE and has the extension of .fw.

This file contains all the firmware for the different ICD units.

The latest software/firmware may be downloaded from the CCS website at:

http://www.ccsinfo.com/download.shtml

The ICD-S, ICD-S3V, ICD-S20, ICD-U have separate firmware to support Pic16 or Pic18. The Latest Compatible Versions section, in the Update Firmware Screen, will list the separate firmware for PIC16 and PIC18. The ICD-U40 and ICD-S40 firmware can support both PIC16 and PIC18 targets.

In order to use the ICD-S with Microchip's MPLAB, load their firmware into the ICD-S. The MPLAB firmware is usually found in the MPLAB directory and as of this writing was named MPL876.HEX. If the connected ICD supports MPLAB firmware and MPLAB5 is installed to Program Files\MPLAB, then the Microchip firmware option will be available in the Update Firmware screen. If MPLAB is installed to a different directory, use the Other option to select the MPL876.HEX file. The MPLAB firmware would work only with ICD-S with the 16f876 chip and 3.68 MHz crystal and cannot be used with any other models. If you have doubts about if your ICD-S is compatible with CCS or MPLAB software contact CCS before you do a firmware switch.

Updating from MPLAB to CCS firmware will automatically reload the bootloader.

Firmware may be changed in the ICD by selecting the Update ICD Firmware button in the ICD software. Check to see if the Update ICD Firmware screen lists firmware for your ICD type in the latest compatible firmware choices. If it lists it for a different ICD type, your unit may be damaged and the ICD will need to be returned to CCS to be reloaded. Contact CCS for support. To use an old CCS firmware use the CCS firmware list to select the appropriate firmware. Use the other firmware options to manually select the firmware to be downloaded to the unit. In most cases you would need to only select the option from the latest compatible firmware choices. If you select the CCS firmware or other option a firmware select window would appear with choices for the appropriate ICD type. If the revision number of the ICD is unknown then an ICD selection window would appear letting you choose your ICD type.

Note: If the bootloader in the ICD becomes damaged the ICD will need to be returned to CCS to be reloaded. Contact CCS for support.


Testing the hardware

Use the CHECK COMM button to check if the PC port is working.

The TEST ICD button tests that the ICD is operating and that the cable to the ICD is functional.

Use the TEST TARGET button to test the communication to the target chip.


Advanced Screen

The Advanced screen provides control over the programming process along with troubleshooting and advanced operations.


Read Device

To Hexfile - This reads the target and saves the program memory, data EEPROM and configuration fuses to a HEX file.

Device ID - This reads the device ID of the target chip. It provides the ID when trying to detect a PIC16 and the ID when trying to detect a PIC18.

Configuration - This reads the configuration fuses and decodes them. The Raw Data section lists the fuse bytes. This is displayed as LSB first.

Checksum - This reads the contents of the target chip and calculates a checksum.


Write Device

From Hex/Coff file - This programs the device with a HEX or COFF file. This is the same functionality of the Download To Target button in the main screen.

One Word - This writes one word to program memory. On PIC18, even if the value can be fit into one byte, it will fill the entire word. Also on PIC18, the address must be word aligned.

Calibrate Nonicd Chip- This button can be used to find the calibration constant and program it to the last program memory location for chips like 12F675, 12F629, 16F630, and 16F676. It returns the calibration constant found and the final speed.

Calibration ICD chip- This button can be used to find the calibration constant and program it to the last program memory location for ICD version chips like 12F675, 12F629, 16F630, and 16F676. It returns the calibration constant found and the final speed.


Erase/Verify Options

Provides functionality for erasing the target chip and verifying that it is blank or comparing the device's contents against a file.

Erase Options

The erase options only erase and do not verify.

Chip Erase- Performs a full erase of the target chip

Program Memory Erase- Erases the program memory of the target chip

Data EEPROM Erase- Erases the data EEPROM of the target chip.

Verify Options

Data EEPROM blank- Reads the data EEPROM to verify if it is blank.

Program Memory blank- Reads the program memory to verify if it is blank

Chip blank- Reads both the data EEPROM and program memory to verify if it is blank. The configuration fuses are not checked. Use the Read Device, Configuration to read the configuration fuses.

Verify against file-Compares the target chip to the contents of a file. This will only check the memory addresses contained in the file.


Program Modes

This specifies the programming mode that ICD uses for programming the target chip. The ICD software validates the programming and erase modes when the user changes them and on start-up.

Fast- The fast mode only works on 5V targets. It provides the fastest way of programming the chip. This uses the program only algorithm of the chip, it does not erase before programming. The erase mode should be set to bulk or erase when needed to use this mode.

Normal- This is the default mode since it will work on both 5V and 3V targets. It can be quite slower than fast mode depending on the target type. It is normal for the progress bar to stop at a percentage for a few seconds before continuing. It is better to use Fast Mode for 5V targets for speed reasons. This mode erases as it programs. The Normal Mode can function with any of the erase modes.


Erase Modes

The erase modes effect how the target is erased before programming.

Bulk Erase on write-This will perform a bulk erase on the entire chip.

Erase when needed-This will erase only the area of memory that needs to be erased. If the file being programmed contains program memory instructions, the entire program memory will be erased. If the file being programmed contains data EEPROM values, the entire data EEPROM will be erased. Bulk erase will still be used if the target is code protected.

No Erase-This programs the target without erasing it. This can only be used with normal programming mode as it erases before programming.


Device

The current detected or assigned device is listed in this box. Press the Redetect button to detect and display the target chip name. Selecting a device and clicking Assign will cause the ICD program to function as if it was detecting that target chip. Press Redetect to return to the normal state of automatically detecting the target chip. Assigned chip is shown in red and the detected chip is shown in normal color (black).


Read the target voltage

Read vdd - Reads the Vdd level from the ICD. IF the ICD is powered by the target power supply, it will match that of the target board. For ICDU-40 rev1 this will be 5 volts as it is powered from the USB. For ICD-U40 rev3 and above it will read the target vdd.


Testing MCLR

MCLR

Sets the MCLR voltage to any of the following options.

Vpp - Programming voltage

Vdd - Releases the target from reset

Vss - Holds the target in reset

Square Wave-Produces a signal on MCLR that toggles between Vpp and Vss.\


Testing PCLK/PDAT

B6,B7

Single shot- Provides signals on B6 and B7 as it reads the target device ID.

Continuous - Continuously reads the target device ID to cause communication on B6, B7.


Connections to User Hardware

How do I connect the CCS ICD to my own hardware?

The ICD-S and ICD-U have an RJ12 connector, and provide an RJ12 cable to connect to prototyping boards. If you wish to add an RJ12 ICD connection to your target board, here is the pin-out:

ICD Socket | Target Socket | Target Pin
1 | 6 | B3 on target PIC - This is optional, used for advance debugging
2 | 5 | (ICSP clock) B6 on target PIC
3 | 4 | (ICSP data) B7 on target PIC
4 | 3 | Ground
5 | 2 | +5V from target to ICD. The ICD-S40 is powered by this pin (5V) and the ICD-U40 uses it to pull up the signals (3V-5V). This is not optional.
6 | 1 | MCLR - Connect to target PIC and pull up to +5V on target board with 47K resistor. The ICD will drive this with 13V during chip programming. No capacitor is desired on MCLR or it would cause programming problems with the ICD.

ICD Socket is the pinout on the ICD unit. Target Socket is the pinout of the target/prototype board; this pinout is applicable if using CCS's provided RJ12 cable.

Notes:

    1. The ICD-U40 is powered by the USB. But the connection from 5-2 should be made as this is used to pull up the signals. U-40 can also supply power(PSV) to the target. For this short the jumper near the ICD jack of the unit (box needs to be opened.)

    2. The ICD-S40 requires mA. If the target power is not to be used, the connection from 5-2 may be cut and an external 5V power supply can be used. This technique may also be used to power both the ICD and the target through the ICD connectors.

    3. To program and/or debug in-circuit, two I/O pins (B6,B7) are reserved. If debugging is not to be done, then these pins may also be used in the target circuit. However, take care to ensure the target circuit has high impedance during programming.

    4. The ICD does not use the Low Voltage Programming mode. C programs should set the NOLVP Fuse.

    5. The target chip oscillator must be running for the ICD to work with a debugger. Programming can be done without an oscillator.

    6. The B3 pin is optional and is not used for programming. However, the Monitor feature of the debugger does use B3. It is possible to program and debug (without monitor) and allocate B3 to the target hardware. In this case, do not connect B3 to the ICD connector. If the monitor feature is not used, userstream can be disabled in the configure tab and the connection from 1-6 does not matter. In the old version of the software, where you cannot disable the userstream using the configure tab, the pin needs to be pulled high at all times. Although B3 is recommended, any PIC pin can be used for this feature.

    7. The MCLR pin is used for programming and debugging. Note that during programming the voltage is 13V. The 47K resistor to 5V is sufficient isolation for the 13V. However, if anything else is connected to the MCLR pin, be sure the 13V will not damage or interfere.

    8. Note the ICD to target cable reverses the pins so the MCLR signal is ICD pin 6 and connects to the target pin 1.

    Chips that do not use B6,B7

    Chip | Instead of B6 | Instead of B7
PIC12F629 | GP1 | GP0
PIC12F675 | GP1 | GP0
PIC12F683 | GP1 | GP0
PIC16F630 | RA1 | RA0
PIC16F676 | RA1 | RA0
PIC16F684 | RA1 | RA0
PIC16F688 | RA1 | RA0

    The following chips do NOT have debugging capability in the standard version of the part. A specific ICD version of the chip is needed for debugging. The ICD chip will have more pins.

    ICD-Chip | Pins
PIC12F629 | 14
PIC12F675 | 14
PIC12F683 | 14
PIC16F630 | 20
PIC16F676 | 20
PIC16F627A | 28
PIC16F628A | 28
PIC16F648A | 28
PIC16F684 | 20
PIC16F688 | 20


Command line use

/Thexfile or -Thexfile or \Thexfile- would automatically detect the target load the hex file and run it. From PCW it would be /T%H or \T%H or -T%H

For eg: ICD "-Tc:\projects\ex3.hex" would detect the target and load ex3.hex to the target

/RAhexfile - would read the entire device to hex file

/RDhexfile - would read the data eeprom of the device to the hex file

+L writes error messages to an errorlog named error.txt in the ICD directory instead of message box.


Burning Serial Numbers

Automatic Serial Numbering

If you have used the #serialize option in the source program the ICD would burn the serial numbers at burn time according to the options specified in the #serialize command. Refer to the compiler help file on how to use the #serialize option.


Using the ICD for Debugging

The ICD software does not have debug capability.

Use the PCW debugger or the MPLAB debugger to debug.

The standard ICD-S hardware will work with PCW, PCWH and MPLAB 5x (MPLAB support only when running MPLAB firmware).

The 20mhz ICD-S, ICD-S3V, ICD-U, ICD-S40 and ICD-U40 will only work with PCW or PCWH.


Troubleshooting

Common Problems

Automatic ICD connection fails

Comm port does not exist

Could not connect, bad firmware loaded

Could not connect, Cannot read firmware revision

Could not detect target chip

Could not open USB port invalid handle

Current CCS firmware needs reloading

Either "The device does not acknowledge the command __" or "No response from the ICD"

LED remains blinking

No LED light on ICD

Verification failure

Verification Results Window

Technical Support

Internet Resources


Common Problems

Automatic ICD connection fails
When the ICD program starts, it will automatically try to connect using the last connection settings. If this fails an option will come up to change the connection settings and retry. To change the connection settings after already connected, press the CONFIGURE PORT button.

Comm port does not exist
ICD program and PCW debugger are trying to access the serial port at the same time. Only one can be used at a time except running ICD for the configuration tab.

Could not connect, bad firmware loaded
The unit has bad firmware loaded into it. The unit needs to be returned to CCS for reload.

Could not connect, Cannot read firmware revision

  1. There was a problem communicating with the ICD.

  2. Check the cable from the serial port to the ICD.

  3. Check the cable from the ICD to target.

  4. ICD will automatically try to reconnect.

  5. Make sure that the connection from icd to user hardware is as specified in the help file. And there are no capacitors connected to MCLR.

Could not detect target chip

  1. See if the current ICD firmware supports the target type. The supported target types are listed in the status bar where the firmware version is displayed. Use the Update Firmware button to switch between firmware types.

  2. Check cable from ICD to target.

  3. Make sure that the target chip is a supported PIC16 or PIC18

Could not open USB port invalid handle
ICD program and PCW debugger are trying to access the USB port at the same time. Only one can be used at a time except running ICD for the configuration tab.

Current CCS firmware needs reloading
The current firmware is not loaded or only partially loaded. Select Update ICD Firmware.

Either "The device does not acknowledge the command __" or "No response from the ICD"

  1. There was a problem communicating with the ICD.

  2. Check the cable from the serial port to the ICD.

  3. Check the cable from the ICD to target.

  4. ICD will automatically try to reconnect.

LED remains blinking
Check PC-ICD cable and comm port settings at PC.

No LED light on ICD
Ensure target has power and cable from target to ICD is connected.

Verification failure
Check all connections from pc to icd and icd to user hardware. Make sure that the connection from icd to user hardware is as specified in the help file. And there are no capacitors connected to MCLR.

Verification Results Window
If the verification fails then a verification results window is displayed with details of the verification failure. This window displays the expected values (read from the hex or coff file) and the actual values (read form the chip) for each of the memories that failed namely program memory, data memory and configuration memory.


Technical Support

The latest software can be downloaded via the Internet at:

http://www.ccsinfo.com/download.shtml

for 30 days after the initial purchase. For one year’s worth of updates, you can purchase a Maintenance Plan directly from CCS. Also found on our web page are known bugs, the latest version of the software, and other news about the compiler.

We strive to ensure that each upgrade provides greater ease of use along with minimal, if any, problems. However, this is not always possible. To ensure that all problems that you encounter are corrected in a diligent manner, we suggest that you email us at support@ccsinfo.com outlining your specific problem along with an attachment of your file. This will ensure that solutions can be suggested to correct any problem(s) that may arise. We try to respond in a timely manner and take pride in our technical support.

Secondly, if we are unable to solve your problem by email, feel free to telephone us at (262) 522-6500 x 32. Please have all your supporting documentation on-hand so that your questions can be answered in an efficient manner. Again, we will make every attempt to solve any problem(s) that you may have. Suggestions for improving our software are always welcome and appreciated.


Internet Resources

ICD Target Devices Supported | http://www.ccsinfo.com/icddevices.shtml
CCS PIC Home Page | http://www.ccsinfo.com/picc.html
Software Download | http://www.ccsinfo.com/download.shtml#ICD
Technical Support | support@ccsinfo.com
Additional Internet Resources | http://www.pic-c.com/links


Changing the connection graphic

The graphic image that pops up to help a user understand the connections may be changed.

Edit the PCW.INI file.

For ICD-S find the section named: [ICD Serial], for ICD-U find [ICD USB].

The BMP= line specifies the name of a bitmap (.BMP file) to use. The size should be 600 pixels wide and 216 pixels high.


Command Line Usage

The ICD software may be invoked from a command line to simply program a target chip with no human intervention as follows:

ICD -T filename.hex

A COFF file may also be used from the command line.


ICD Types

There are two basic types of ICD models, ICD-S and ICD-U. The ICD-S connects to the PC through a serial port. The ICD-U connects to the PC through a USB port. Each ICD has a label that says either ICD-S or ICD-U.

Also, there are different types of ICD-S and ICD-U modules.

There is the original ICD-S. It has the ICD-S label and no sticker on the back. The ICD-S3V is the original ICD-S but it also can be powered with 3V. The ICD-S3V has a LF 3V sticker on the back. The ICD-S20 runs at 20Mhz and has a 20Mhz sticker on the back. The ICD-S40 runs at 40 MHz and are labelled ICD-S40.

The original ICD-U runs at 20Mhz and does not have a sticker on the back. The ICD-U40 runs at 40Mhz and has a 40MHZ sticker on the back or has an ICD-U40 label on the front.


Mode

This performs the same functions as the Run Program button on the main screen.


Options Menu

This menu gives the following options:

Warn about CPU Mode Fuses

The options menu provides control over warnings during ICD programming. These options also affect the PCW or PCWH debugger. The ICD cannot program external EEPROM. When the file being programmed has fuse settings for Microprocessor mode, the ICD will behave differently. When this is selected, a warning is shown that states what the ICD program will do differently.

Warn about potential problems with 3V programming.

When this is selected, the ICD will provide a warning when programming a chip powered at 3V with a mode that is incompatible with 3V. These warnings are displayed only when the ICD and target have the same power supply.

Show Download Message

If this option is selected the ICD software gives a download completed message when the programming and verification is successful.

Update Firmware Settings

These settings affect the update firmware process. By default, the ICD program will provide a listing of firmware options. This functionality can be modified to automatically use one setting.

User Select - The default option. It provides a list of available firmware.

CCS Firmware - This will automatically update to the latest version of the current CCS Firmware.

Microchip - This will automatically update to MPLAB firmware.

Other - This is the same functionally that older versions of the ICD program provided. It displays a dialog box for the user to select the firmware file.


Other Options

The buttons in the Other Options section shows a side panel with additional options specific to a device or function.


PIC16, PIC 18 Interface

This provides additional functionality for PIC16 or PIC18 targets.

MCLR

Sets the MCLR voltage to any of the following options.

Vpp - Programming voltage

Vdd - Releases the target from reset

Vss - Holds the target in reset

Square Wave-Produces a signal on MCLR that toggles between Vpp and Vss.

B6,B7

Single shot - Provides signals on B6 and B7 as it reads the target device ID.

Continuous - Continuously reads the target device ID to cause communication on B6, B7.

Read Vdd - Reads the Vdd level from the ICD. If the ICD is powered by the target power supply, it will match that of the target board. For ICDU-40 this will be 5 volts as it is powered from the USB.


Connecting the ICD-U Hardware

Connecting the ICD-U or ICD-U40 Hardware

The ICD-U must be connected to a PC USB port and to the target system.

The first time your ICD-U is connected to the PC, Windows will ask you to insert your driver diskette.

This diskette was included with your ICD-U unit.

The power for the ICD-U comes from the target system.

The power for the ICD-U40 comes from the USB cable.

The solid LED indicates the ICD-U has power.

After the ICD software is started, the solid LED indicates communication with the PC.

Long cables from the target to the ICD are not recommended.

In order to power the ICD-U independent of the target, see "Connecting the ICD-U to user hardware". The ICD-U40 is self powered through the USB cable.


Connecting the ICD-S hardware

Connecting the ICD-S, ICD-S3V, ICD-20 or ICD-S40 hardware

The ICD-S requires a serial port that supports 19200 baud rate.

The ICD-S must be connected to a PC serial port and to the target system.

The power for the ICD-S comes from the target system.

Once the target hardware is powered up, the blinking LED indicates the ICD-S has power. A solid LED indicates that the ICD-S is powered and the serial cable is connected to the PC.

After the ICD-S software is started, the solid LED indicates communication with the PC.

Long cables from the target to the ICD-S are not recommended.

In order to power the ICD-S independent of the target, see "Connecting the ICD-S to user hardware".


Connecting the ICD to user hardware

1 2 3 4 5 6

ICD Socket | Target Socket | Target Pin
1 | 6 | B3 on target PIC – This is optional, used for advanced debugging
2 | 5 | B6 on target PIC
3 | 4 | B7 on target PIC
4 | 3 | Ground
5 | 2 | +5V from target to ICD. The ICD is powered from this pin.
6 | 1 | MCLR - Connect to target PIC and pull up to +5V on target board with 47K resistor. The ICD will drive this with 13V during chip programming. If a capacitor is desired on MCLR the maximum value should not exceed .01uf as it would cause programming problems with the ICD.

Notes:

1. The ICD requires 50 mA. If the target power is not to be used, the connection from 5-2 may be cut and an external 5V power supply used. This technique may also be used to power both the ICD and target through the ICD connectors.

2. Avoid connecting B6, B7 to other components on the target board.

3. The ICD does not use the Low Voltage Programming mode.

4. The target chip oscillator must be running for the ICD to work with a debugger. Programming can be done without an oscillator.

5. Contact CCS if you would like scope diagrams of what the signal looks like to help diagnose a user hardware problem.

6. Make sure B3 stays high, even if not used.


Debugging a program

The ICD software does not have debug capability.

Use the PCW debugger or the MPLAB debugger to debug.

The standard ICD-S hardware will work with PCW, PCWH and MPLAB 5x (MPLAB support only when running MPLAB firmware).

The 20mhz ICD-S, ICD-S3V, ICD-U, ICD-S40 and ICD-U40 will only work with PCW or PCWH.


ICD Firmware

The ICD ships with CCS firmware installed. The firmware contains a bootloader that allows for user firmware upgrades. The current firmware is located in the same directory as ICD.EXE and has the extension of .fw.

This file contains all the firmware for the different ICD units.

The latest software/firmware may be downloaded from the CCS website at:

http://www.ccsinfo.com/download.shtml

The ICD-S, ICD-S3V, ICD-S20, ICD-U have separate firmware to support Pic16 or Pic18. The Latest Compatible Versions section, in the Update Firmware Screen, will list the separate firmware for PIC16 and PIC18. The ICD-U40 and ICD-S40 firmware can support both PIC16 and PIC18 targets.

In order to use the ICD-S with Microchip's MPLAB, load their firmware into the ICD-S. The MPLAB firmware is usually found in the MPLAB directory and as of this writing was named MPL876.HEX. If the connected ICD supports MPLAB firmware and MPLAB5 is installed to Program Files\MPLAB, then the Microchip firmware option will be available in the Update Firmware screen. If MPLAB is installed to a different directory, use the Other option to select the MPL876.HEX file. The MPLAB firmware would work only with ICD-S with the 16f876 chip and 3.68 MHz crystal and cannot be used with any other models. If you have doubts about if your ICD-S is compatible with CCS or MPLAB software contact CCS before you do a firmware switch.

Updating from MPLAB to CCS firmware will automatically reload the bootloader.

Firmware may be changed in the ICD by selecting the Update ICD Firmware button in the ICD software. Check to see if the Update ICD Firmware screen lists firmware for your ICD type in the latest compatible firmware choices. If it lists it for a different ICD type, your unit may be damaged and the ICD will need to be returned to CCS to be reloaded. Contact CCS for support. To use an old ccs firmware use the ccs firmware list to select the appropriate firmware. Use the other firmware options to manually select the firmware to be downloaded to the unit. In most cases you would need to only select the option from the latest compatible firmware choices. If you select the ccs firmware or other option a firmware select window would appear with choices for the appropriate icd type. If the revision number of the icd is unknown then an icd selection window would appear letting you choose your icd type.

Note: If the bootloader in the ICD becomes damaged the ICD will need to be returned to CCS to be reloaded. Contact CCS for support.


Loading a program into the target

Click the Download To Target button in the ICD software to download a HEX or COFF file to the target.

The ICD software will download the program and, if in the file, data EEPROM data. The previous contents of memory are erased based on the current erase mode. The memory contents are verified and the configuration word from the file will be programmed. If the DEBUG flag is enabled in the configuration word, it is disabled by the ICD since the ICD software may not be used for debugging.


PC cannot establish communication and LED is solid

Bootloader in ICD may be damaged. Contact CCS for support.


Running a program

The Run Program button will release the MCLR so the target program may run. The ICD will not interfere with B6 or B7 after the program is started.

The button changes to Stop Program when the program is running and pressing this button will again assert MCLR.


Testing the setup

Use the CHECK COMM button to check if the PC port is working.

The TEST ICD button tests that the ICD is operating and that the cable to the ICD is functional.

Use the TEST TARGET button to test the communication to the target chip.


What is the ICD?

The In Circuit Debugger allows for easy downloading and optional debugging of programs for certain micro controllers. The ICD does not work with all chips. The chip must have ICSP for programming support and ICD capability for debugging support. See http://www.ccsinfo.com/icddevices.shtml for a list of all supported chips.

The ICD connects to the micro controller via MCLR, B7, B6 and B3. Using B6 and B7, the ICD can download programs and communicate with a debug module in the micro controller. Connecting B3 is optional, it is used for the debug monitor in PCW. If B3 is connected, do not use it in a program being debugged. If port B is used in a program, keep B3 high. If B3 is optionally not connected keep it pulled high.

When debugging certain RAM and ROM locations, one stack location and the B6,B7 pins are used during program execution.

The ICD modules, with the exception of the ICD-U40, are powered by the target board.

The ICD software has the capability to download to the target and to update its own firmware. In order to debug, a separate debugger like PCW or PCWH must be used.