Monday, May 23, 2011

PIC Programming using ICSP and ICPROG

IC-Prog is a free windows program that you can use for PIC Programming. It interfaces using either the serial or parallel port on a PC. You can download IC-Prog here. The following devices are currently supported IC-Prog software.

Microchip PIC devices:  
Spi Microcontrollers:  
Flash Microcontrollers:  
Philips Serial Microcontrollers:  
I2C eeproms:  
4-Wire eeproms:  
Spi eeproms:   
Microwire eeproms:  
Modern Serial eeproms:  
IM-Bus eeproms:  
Scenix/Ubicom devices : 

Setting up the IC-Prog environment
When we first start IC-Prog this is the screen we see for selecting the hardware for the PIC programmer; I have selected JDM programmer - a serial port programmer, Windows API - interface and leave rest of the settings same.

Press OK to continue. After this the main program screen is displayed.

How to select a device to program:
Device can be selected in two ways. Firstly, we can select our device (in my case it is 16f877a) from combobox located at top right side of the IC-Prog software window.

Secondly, goto to software menu and select Settings->Device->Microchip PIC->More->More->PIC 16f877a.

Now goto File->Open and select hex file to be uploaded (burned) in PIC 16f877a microcontroller. When opened file get loaded in IC-Prog buffer following action can be taken :

Program Device

The program device button does just that it programs the contents loaded from the hex file (in IC-Prog memory) into the program memory of the PIC micro. If there is any EEPROM in the chip then it programs this as well. Finally it programs the configuration word

Read Device
The read device button reads back the entire contents of the chip into the currently selected buffer (shown at the bottom of the ICPROG window). So you can save the hex file or compare it to the contents of another buffer.

Verify Device
The verify device button reads back the entire contents of the chip ensuring that it matches the hex file. Verification may automatically happen at the end.Once you get used to IC-Prog and your hardware works reliably you may only want to do a verify if something does not work otherwise it takes more time up.
Note: Depending on settings in menu (Settings->Options->Programming)

Erase Device

The next PIC programming action is to erase the device by hitting the erase device button. It sends a command to the PIC which erases the whole device including protection bits. So this command quickly erases the chip.

Note: You don't have to use the erase button as the program button will overwrite the chip contents anyway. It is sometimes useful if you want to convince yourself that the program is actually programmed into the device correctly.

Which are ICSP pins of microcontroller
As we know ICSP pins are used to upload hex file in microcontroller. Here are ICSP pins of some PIC microcontroller.






Some Useful Videos
Watch following videos to setting up the JDM Programmer hardware settings in IC-Prog software and uploading hex file in microcontroller (in my case it is 16f877a).

IC-Prog Settings

Uploading hex file


  1. Thanks!
    Very Helpful...!

  2. Clear and helpful..Thanks, appreciate your efforts.