Fully-detailed instructions for assembly and test of the PIC-EL Kit.
Section 13: Programming a PIC
This section is really straightforward ... when things are working right. But first, let's start with the things that are expected to be done before attempting to program a PIC.
Hopefully you've installed FPP as described in Lesson 10, posted on the project website. Having gone through this you will have successfully installed the program, activated the driver and seen some lines wiggle on the board. If you haven't done this yet, you should focus right here first before proceeding.
The cable needed for connection between the PC and PIC-EL board is actually required in this first step. It is a standard straight thru 9-pin DB9M (male) to 9-pin DB9F (female) connector. You can pick this cable up at many computer supply places like Staples, Best Buy,Mouser or even from Radio Shack (p/n 26-117B). The cable plugs into the RS-232C serial port on your PC and the other end plugs into the PIC-EL board. If you only have a USB port, as some more modern computers come these days, you'll need to get a USB-to- RS232 adapter, as explained elsewhere on the project page.
Another thing that's important to remember doing when a PC application such as FPP is attempting to use the serial port is to "disable" other programs also using that same swerial port. For example, on my own system I need to "exit" my HotSync program that talks to my Palm PDA in the docking cradle. Another thing that often commands the serial port, effectively blocking its use by other programs, is an IDE development program (perhaps like MPLab, and certainly like the Motorola ICS08 IDE that I use for the HC908 Daughtercard development).
Lastly, be sure that you have a sufficiently high voltage power supply connected to you PIC-EL board. Although the board can run off a 9V battery, as I've done at our club meetings, you'll need to have at least 12V present on the connector in order to geneerate the minimum "programming voltage", called Vpgm.
Okay, now that the cable is connected, you've got FPP loaded and turned on, your PIC-EL board is powered by at least 12V, and you've manually wiggled the lines as described in Lesson 10, it should be a piece of cake to program a PIC on the PIC-EL board.
2) Obtain the .HEX
The HEX file is the new software you will be burning into the PIC. You can download the TestSoftware.ZIP program from the web page, which will create a bunch of files on your computer when unzipped. The T- PICEL.HEX file contains the Test Program in "hex ascii" format, which is just a specific data format expected by the FPP program. I normally place all the software files into a folder called PICsoftware.
3) Load the T-PICEL.HEX
file into FPP.
Click on the LOAD button and navigate to wherever you unzipped the TestSoftware.ZIP files on your local computer (like the folder called PICsoftware). You will see the t-picel.hex file listed there - just double-clik it and the hex ascii code will load into the FPP buffer. You will see that code in the FPP window.
4) Slide mode switch
S1 DOWN to PGM MODE.
You need to move the slide switch S1 to the DOWN position in order to put the PIC-EL board into the PGM Mode. The LED next to the switch will turn on when you do this.
5) Erase the PIC
currently plugged into the PIC-EL board.
You first need to "erase", or clear out the software program currently in the PIC's flash memory before you are able to burn a new program into the PIC. Click the ERASE button to do this, and if successful you will see a simple message pop up saying "PIC is erased".
6) Burn the new code
into the PIC.
Now that the PIC memory is empty and you have the new program (t-picel.hex) in the FPP buffer window, you are all set to burn the program into the PIC. Click PROGRAM on the FPP application window and confirm your desire again in the pop-up window. It will take a few moments for this short program to be burned into the PIC, but when complete FPP will display "Device programmed!". If it says "Programming failure", you obviously have a problem like the PIC was not first erased, power supply wasn't connected or sufficiently high, cable was not plugged in, etc.
7) Slide the mode
switch UP to go into RUN MODE.
Now that the programming is complete, you next need to put the PIC-EL board back into RUN Mode. Do this by sliding Mode Switch S1 UP, and the PGM LED will turn off once again.
8) RESET the board
to start up the new program.
Although not always necessary, just press the RESET pushbutton on the PIC-EL board to start up the new program just programmed into the PIC.
Back to PIC-EL Manual Contents
Back to AmQRP Home Page
Page last updated: February 4, 2004