Page 165 - PDA Robotics Using Your Personal Digital Assistant to Control Your Robot
P. 165

PDA 07  5/27/03  8:44 AM  Page 141
                                          Chapter 7 / Programming the PIC16F876 Microcontroller
                                 command line DOS versions are more up to date than the graphical
                                 DOS version, and are able to program more types of PICmicro MCUs.
                                 EPIC for DOS
                                 Start the DOS version of the EPIC software by typing “epicdos” at the
                                 DOS command prompt in the directory you created previously. The
                                 EPIC  software  will  look  around  to  find  where  the  EPIC  Plus
                                 Programmer is attached, and get it ready to program a PICmicro MCU.
                                 If the EPIC Programmer is not found, check all of the above connec-
                                 tions and verify that no PICmicro MCU is installed in the programmer
                                 or any connected adapter.

                                 Once the programming screen is displayed, select the device type you
                                 wish to program. For PIC16C8x or PIC16F8x parts, select 8x. For the
                                 PIC14C000,  PIC16C55x,  6x,  7x,  or  9x  parts,  select  6x/7x/9x.  For
                                 PIC12C5xx parts, select 12C50x.

                                 Enter “Alt-O” (or click “Open” with the mouse) to open your assem-
                                 bled object (.HEX) file. Double-click on the appropriate file to load it.
                                 Once the file has been loaded, make sure the proper device character-
                                 istics are selected. See the Microchip data books for information on
                                 device configuration.
                                 Caution: Be sure that Code Protect is set to OFF before programming a
                                 windowed (JW) PICmicro MCU. You may not be able to erase a win-
                                 dowed part that has been code protected.

                                 Insert a PICmicro MCU into the EPIC Plus Programmer or connected
                                 adapter socket. The end of the PICmicro MCU with the notch should
                                 be all the way at the Pin 1 end of the socket, away from the battery
                                 connectors. Press “Alt-P” (or click “Program” with the mouse) to pro-
                                 gram the PICmicro MCU.

                                 Before programming, the EPIC software does a blank check to ensure
                                 that the part is erased. PIC12Cxxx parts are not completely blank from
                                 the factory. They contain a calibration value in the last location. Simply
                                 tell EPIC that it is OK to program them anyway, when it finds they are
                                 not blank. If the PICmicro MCU is a 16F84 or another EEPROM or flash
                                 part, it is usually not necessary to erase it before programming.

                                 Typing “epicdos /?” at the DOS command prompt will display a list of
                                 available options for the EPIC software.


                                                                                               141
   160   161   162   163   164   165   166   167   168   169   170