Programming your PIC

When you are done debugging with the simulator, you can program a PIC.  Always start with one of the windowed packages that can be erased, and when you are certain that your program works, you can program a non-windowed package.

First go to Project->Edit and change the Development mode to Editor only.   Next, enable the  PICSTART Plus.  Look in the "PICSTART Plus" menu.  Check that the configuration bits are set as shown. Make sure that "Code Protect" is Off.

Connect the PICSTART programmer to the serial cable from the computer, and connect the power supply.

Important:   Make sure that the power supply looks something like the one shown below. 

wpe1D.gif (157598 bytes)

It is very important to make sure that the power supply generates 9V DC, and that the polarity of the connector (shown by wpe1E.gif (8144 bytes)) is correct.  Connecting the wrong supply will damage the programmer.

Insert the microcontroller in the PICSTART Plus programmer.  Do a blank test. If the mic is blank go ahead and "Program" otherwise erase the microcontroller memory using UV light eraser for about 20 minutes and then program it.  The EPROM eraser is on the same bench as the soldering irons in Hicks 310.  To use the UV light, set the timer and then press the red button for a few seconds.  When you let go, there should be a purple glow from the small round window on the end of the box.