The Microchip ICD4 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 ICD4 (or ICD3).

1. Purchase a Microchip ICD 4 Debugger / Programmer (Microchip part number DV164045).

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 4’

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 ‘Hex File’ 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 “Output IPE” 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.

Notes

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 are using a pre Windows 10 PC an can’t connect to the ICD 4/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 ICD4 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.

USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.

Comments

Your email address will not be published. Required fields are marked *