PICPgm Development Programmer software screen shot.
elproducts EZ PIC JDM based PIC hardware programmer.

Programming a PIC

To get started programing a PIC chip I am using a free software program called "PICPgm Development Programmer" and my elproducts EZ PIC hardware programmer board that is based on what is known as the JDM serial port programmer.

At the PICPgm website you can find out what hardware programmer boards can be used with the software and a list of devices supported by the software.

I had been using the IC-Prog Prototype Programmer software to program the 16F876A and 16F877A devices I was using but have switched to the PICPgm program since it supports the newer 16F886 and 16F887 PIC microcontrollers that I am currently using.

PIC modules on breadboard.

With the above programmer setup you can load compiled PIC programs you create or acquire into a PIC chip.
On some PIC chips such as the 16F876A you can load a bootloader program into the chip.

Once the bootloader software is loaded on the 16F876A, you won't need the hardware programmer to load a new program. You can plug the PIC chip into a breadboard and use a RS-232 serial communications module to load new programs without overwriting the bootloader program.

Home-built serial port module for computer serial port to PIC chip communications.

I used bootloader files that came with MicroCode Studio Plus but free bootloader files can be downloaded from other sources.

There are two bootloader files included with my copy of MicroCode Studio Plus for the 16F876A PIC chip.
They are named "16F876A_04.hex" and "16F876A_20.hex".

The 04 indicates the bootloader is to be used with a 4 MHz resonator and the 20 with a 20 Mhz resonator.
The bootloader program and your main program must be coded for the same resonator frequency.

Screen shot of Tiny Bootloader program running on laptop computer.
Silabs CP2102 based USB to UART board.

I have started using another Bootloader Program named Tiny Bootloader and the bootloader files that were included with the program to program PIC 16F886 and 16F887 devices because my version of MicroCode Studio Plus does not have bootloader file support for these newer devices.

The Tiny Bootloader software also works with a Silabs CP2102 based USB to UART converter board I recently purchased.

Once the bootloader program is installed on a PIC chip using my old desktop computer and serial hardware programmer, I can use my laptop computer, Tiny Bootloader software and the usb to serial converter board to load my programs on a chip.

Windows Vista device manager screenshot for Silicon Labs CP210x driver.

After installing the Silabs driver and plugging in the board I opened Windows device manager to check the install.
The Silicon Labs driver is located under Ports (Com & LPT) and shows up on my laptop as com 6.

PIC serial programming connections.

To select com6 in the Tiny Bootloader program on my computer you have to plug the USB board into the computer before opening the program otherwise it will not be available to select.

On my CP2102 usb to serial converter board the pin labeled as Rx is actually the Tx pin and vice versa. They are labeled for what they connect to, as opposed to what they are.

MicroCode Studio Plus screen shot.

Writing and Compiling a Program

To write and compile code for the PIC chips I am using MicroCode Studio Plus interfaced with the PIC Basic Pro compiler.

To get started programming PIC chips without spending too much money you can download the standard version of MicroCode Studio for free and purchase a low cost student / experimenter version of PIC Basic Pro.

page 2 of 3

< Previous            Next >