PIC Micro Hardware Programming Methods

There are three ways to program a PICPIC Micro: Low volt programming (LVP)
microcontrollerLVP is exactly the same as HVP except:
- The Vpp voltage is set to the normal supply voltage.
1. Using normal programming hardware (high volt- The PGM pin indicates programming mode.
programming HVP).Note: In this mode you can not use the PGM pin for
2. Low volt programming (LVP).anything else it is dedicated solely to LVP control.
3. Bootloading.Devices are manufactured with PGM mode enabled
The first two methods use the programming port ofand the only way to turn off the PGM mode is to
the PIC microcontroller labeled ICSP (In Circuit Serialprogram it using an HVP programmer.
Programming).Note: Some PIC microcontrollers can only use the HVP
This port is shared between the existing pins of themethod since for the LVP method you have to
microcontroller and after programming the pins revertsacrifice one pin - PGM - (to tell the PIC Micro either
back to normal microcontroller operation.that it is being programmed (high volts e.g. 5V) or that it
Note: To make ICSP work correctly you have tois not being programmed (0V) ) and some PIC micros
consider the effects and requirements of the ICSPonly have 8 pins e.g. 12F675. For this chip the PGM pin
programmer e.g. for HVP a high voltage exists at theis not available so HVP is the only way.
Vpp pin (your circuit must be able to handle the highThe real benefit of using the LVP mode is that you
voltage - up to 13V). Also the loading for the othercan program several PIC Micros on a board without
signals PGC and PGD must not be too high i.e. don'thaving to individually program each one - you could
put an LED on these pins that uses 20mA - if you diddaisy chain each extra micro to a master micro which
the voltage levels would not be high enough at thewould then program each one in turn - and this is only
inputs to the PIC for programming.possible since the Vpp signal is a normal logic level in
It's fairly easy to design for ICSP use by using isolationLVP mode.
resistors to normal circuitry and choosing not to usePIC Micro: Bootloading
heavy loads on these pins.Bootloading uses any available interface to load a
ICSP provides 6 connections from the pic ICSPprogram into program memory. It requires a bootstrap
programmer to your board as follows :program to interpret the interface data and translate it
VPP - (or MCLRn) Programming voltage (usually 13V).into program memory instructions.
Vcc - Power (usually 5V).Note: Note only the newer devices that are capable of
GND Ground (zero volts).programming their own memory can use this method.
PGD - Data usual port and connection RB7.Typically a serial port is used for bootloading and the
PGC - Clock usual port and connection RB6.PIC micro bootstrap program will wait for a set time
PGM - LVP enable usual port and connection RB3after power up listening on the serial port for a
RB4.reserved word that tells the bootstrap program to
PIC Micro: High Volt Programmingstart i.e. it listens for sequence of characters that is not
To use the first method a hardware interface isnormally used on the interface
needed or 'PIC programmer' to interface between theOnce it receives this sequence it enters bootstrap
programming software (usually running on the PC) andmode where a hex file is transmitted to the
the PIC chip. This hardware takes its information frommicrocontroller over the interface. It interprets this and
the PC via one of three interfaces either:programs the memory of the microcontroller and then
- The RS232 COM portstarts the program.
- The Parallel portThere are two issues with this method:
- The USB port
You choose the interface you want to use and then1. You have to program the bootstrap code using HVP
choose an appropriate PIC programmer. The PC thenor LVP.
communicates with the hardware generating the serial2. It uses up some of the microcontroller resources.
(ICSP) signals to translate the PIC hex file into a serialOnce programed it provides a convenient way of
data stream suitable for the target microcontroller.using the device as you won't need programming
Note: Almost all PIC microcontrollers use the ICSPhardware anymore and one major benefit is that you
interface so once you have a HVP you can programcan re-program a device without undoing the
virtually any PIC microcontroller. e.g. you can programequipment e.g. if you boxed up you project you could
12F675, 16F84, 16F88, 16F877(A), 18F2550, 18F452 etc.still re-program it using the serial port!
There are several programs for programming PICYou can find more information from the website here
micos e.g. ICPROG and many different hardwareand how to build a website like it here.
programmers.