The Microchip ICD3 is a great low cost USB programmer we recommend for carrying out in circuit firmware programming and upgrades of Microchip microcontrollers. There are other programmers that are also suitable, however this guide is deals with the Microchip ICD3.
1. Purchase a Microchip ICD 3 Debugger / Programmer (Microchip part number DV164035).
2. Make the necessary cable to connect to the programming header on the PCB.
3. Download MPLAB X from the Microchip Web Site (its free).
4.Now run MPLAB IPE from the ‘MPLAB X IDE’ programs folder.
5. Select the ‘Family’ of the microcontroller (usually the first few letters of its part number, e.g. “PIC18” or “PIC32″)
6. Now select the ‘Device’, using its whole part number .
7. For ‘Tool’ select the ‘ICD 3’ (if it is not shown see the notes section below)
8. Press ‘Apply’
9. Press ‘Connect”. The Output window will show the results, which may involve the software updating the programmer for a couple of minutes. Don’t worry if you get a ‘Target device was not found’ error, this will occur unless your target PCB is connected to the programmer and powered up.
10. Now press the ‘Source’ Browse button:
Select the .hex file to program the device with.
11. You are now all set to program the microcontroller on your boards.
Connect the programmer to the PCB programming connector. If the connector is a simple pin header pin 1 will be marked with an arrow on the PCB and pin 1 of your programming cable connector should also be marked in some way.
Press the ‘Program’ button.
The “ICD 3” output window at the bottom of the screen will tell you if the programming operation was successful or not.
Repeat this for each PCB to be programmed.
This guide isn’t extensive and Microchip may have altered their software since it was written. If you run into problems please contact us.
If you can’t connect to the ICD 3 programmer (e.g. it isn’t shown) try using the Microchip “MPLAB Driver Switcher” tool. Its in the same “MPLAB X IDE” start menu folder – right click it and select Run As Administrator and then use it to set the ICD 3 to be used by ‘MPLAB X’, not ‘MPLAB’.
If you have problems with programming continually failing then check your programming cable from the ICD3 to the PCB. Problems have been experienced in the past with cables that appear fine when tested with a continuity tester but due to poor connections would cause programming to inexplicably fail. If in doubt make a new cable to be sure this is not the problem.
Using MPLAB (not MPLAB X) – The Old Method
Ensure your PC is running the latest version of MPLAB IDE (V7.# or higher which may be downloaded from www.microchip.com) – this must be installed before connecting the ICD2/3 programmer to the PC.
- Connect the ICD2/3 programmer to your PC using its USB cable (do not connect its power supply – it will take its power from the USB port). If it is the first time it has been connected wait for Windows to finish installing the USB drivers. Then run the Microchip MPLAB IDE software.
- From the menu select:- ‘Configure’ > ‘Select Device’ > Select the device you are programming (you can find this in the manufacture documentation, on the circuit diagram or by looking at the part number on the PCB).
- From the menu select:- ‘Programmer’ > ‘Select Programmer’ > ‘ICD2’ or ‘ICD3’
- From the menu select:- ‘Programmer’ > ‘Settings’. Ensure that ‘Allow ICD2/3 to select memories and ranges’ IS checked in the ‘Program’ tab:
- Select the Power tab and, unless directed otherwise in the IBEX manufacture documentation, made sure the ‘Power target circuit from MPLAB ICD2/3’ is NOT checked. Press ‘Apply’ and then ‘OK’ to close the window
- From the menu select:- ‘File’ > ‘Import’ > Select the ROM firmware file to be used ([filename].hex).
Then for each PCB to program follow the following procedure:
- Disconnect power from the PCB if it is powered.
- Connect the ICD2 to the ‘Programming’ header, ensuring pin 1 of the ICD2 cable (marked on connector) connects to pin 1 of the PCB connector (indicated by 2 arrows on our PCB’s). (If connecting to a 7 pin PCB header then pins 6 & 7 will be un-connected)
- Power the PCB (always after connecting the ICD2 to it).
- Press the ‘Program Target Device’ button in MPLAB.
- Watch the ‘Output’ window and wait for programming and verifying to complete.
- Disconnect the PCB power.
- Disconnect the ICD2/3 programming lead from the PCB
- Re-power the PCB
- Verify the correct operation of the PCB using the new firmware