![]() |
For most Microchip microcontrollers, ICSP programming is performed using two pins, clock (PGC) and data (PGD), while a high voltage (12 V) is present on the Vpp/MCLR pin. Low voltage programming (5 V or 3.3 V) dispenses with the high voltage, but reserves exclusive use of an I/O pin.
However, for microcontrollers, specifically PIC18F6XJXX/8XJXX microcontrollers families from Microchip Technology, entering into ICSP modes is a bit different. Entering ICSP Program/Verify mode requires the following three steps:
- Voltage is briefly applied to the MCLR (master clear) pin.
- A 32-bit key sequence is presented on PGD.
- Voltage is reapplied to MCLR.
A separate piece of hardware, called a programmer is required to connect to an I/O port of a PC on one side and to the PIC on the other side. A list of the features for each major programming type are:
- Parallel port - large bulky cable, most computers have only one port and it may be inconvenient to swap the programming cable with an attached printer. Most laptops newer than 2010 do not support this port. Parallel port programming is very fast.
- Serial port (COM port) - At one time the most popular method. Serial ports usually lack adequate circuit programming supply voltage. Most computers and laptops newer than 2010 lack support for this port.
- Socket (in or out of circuit) - the CPU must be either removed from circuit board, or a clamp must be attached to the chip-making access an issue.
- USB cable - Small and light weight, has support for voltage source and most computers have extra ports available. The distance between the circuit to be programmed and the computer is limited by the length of USB cable - it must usually be less than 180 cm. This can make programming devices deep in machinery or cabinets a problem.
Signals and pinout
- Vpp - Programming mode voltage. This must be connected to the MCLR pin, or the Vpp pin of the optional ICSP port available on some large-pin-count PICs. To put the PIC into programming mode, this line must be in a specified range that varies from PIC to PIC. For 5 V PICs, this is always some amount above Vdd, and can be as high as 13.5 V. The 3.3 V only PICs like the 18FJ, 24H, and 33F series use a special signature to enter programming mode and Vpp is a digital signal that is either at ground or Vdd. There is no one Vpp voltage that is within the valid Vpp range of all PICs. In fact, the minimum required Vpp level for some PICs can damage other PICs.
- Vdd - This is the positive power input to the PIC. Some programmers require this to be provided by the circuit (circuit must be at least partially powered up), some programmers expect to drive this line themselves and require the circuit to be off, while others can be configured either way (like the Microchip ICD2). The Embed Inc programmers expect to drive the Vdd line themselves and require the target circuit to be off during programming.
- Vss - Negative power input to the PIC and the zero volts reference for the remaining signals. Voltages of the other signals are implicitly with respect to Vss.
- ICSPCLK - Clock line of the serial data interface. This line swings from GND to Vdd and is always driven by the programmer. Data is transferred on the falling edge.
- ICSPDAT - Serial data line. The serial interface is bi-directional, so this line can be driven by either the programmer or the PIC depending on the current operation. In either case this line swings from GND to Vdd. A bit is transferred on the falling edge of PGC.
- AUX/PGM - Newer PIC controllers use this pin to enable low voltage programming (LVP). By holding PGM high, the micro-controller will enter LVP mode. PIC micro-controllers are shipped with LVP enabled - so if you use a brand new chip you can use it in LVP mode. The only way to change the mode is by using a high voltage programmer. If you program the micro controller with no connection to this pin, the mode is left unchanged.
RJ11 pinout
OVERVIEW (PICkit 2)
1 - Status LEDs:
The Status LEDs indicate the status of the PICkit™ 2 Microcontroller Programmer.
- Power (green) – Power is applied to the PICkit™ 2 Microcontroller Programmer via the USB port.
- Target (yellow) – The PICkit™ 2 Microcontroller Programmer is powering the target device.
- Busy (red) – The PICkit™ 2 Microcontroller Programmer is busy with a function such as Program mode or is alerting that a function is in progress.
2 - Push Button:
The push button may be used to initiate the Write Device programming function when Programmer > Write on PICkit Button is checked. 3 - Lanyard Connection:
To help prevent possible loss of the The PICkit™ 2 Microcontroller Programmer, a convenient lanyard connection is available on the programmer.4 - USB Port Connection:
The USB Port Connection is a USB mini-B connector. Connect the PICkit 2 Microcontroller Programmer to the PC using the supplied USB cable.
5 - Pin 1 Marker:
This marker designates the location of pin 1 for proper connector alignment.
6 - Programming Connector:
The programming connector is a 6-pin header (0.100" spacing) that connects to the target device.
A convenient lanyard connection is available on the programmer.
2 - USB Port Connection:
The USB port connection is a USB mini-B connector. Connect the PICkit 3 to the PC using the supplied USB cable.
3 - Pin 1 Marker:
This marker designates the location of pin 1 for proper connector alignment.
4 - Programming Connector:
The programming connector is a 6-pin header (0.100" spacing) that connects to the
target device. 5 - Status LEDs:
The Status LEDs indicate the status of the PICkit 3.
- Power (green) – Power is supplied to the PICkit 3 via the USB port.
- Active (blue) – The PICkit 3 has connection to the PC USB port and the communication link is active.
- Status:
Busy (yellow) – The PICkit 3 is busy with a function in progress, such as programming.Error (red) – The PICkit 3 has encountered an error.
6 - Push Button:
The push button is used for Programmer-To-Go
PICkit 3 VS. PICkit 2
The PICkit 3 programmer/debugger system is similar in function to the PICkit 2
in-circuit debugger system. Similarities of the two debuggers include:
- Powered via USB cable to PC
- Provides a programmable voltage power supply
The PICkit 3 differs from the PICkit 2 by providing:
- Extended EE program image space (512 Kbytes)
- True voltage reference
- Increased voltage range (1.8-5V VDD; 1.8-14V VPP)
Connection Wiring
![]() |
VDD Setting (5V or 3.3V):
20 Pin (PIC24 Series):
28 Pin (dsPIC, PIC24 Series):
40 Pin (dsPIC Series):
- 5V: for PIC operating voltage up to 5.0V and dsPIC30 series
- 3.3V: for PIC operating voltage up to 3.3V, ‘LF’ series, 'J' series, dsPIC33 and PIC24F
Pull-up Resistor (for MCLR pin):
- User may connect the pull-up resistor with following method:
Vcap Capacitor:
- Capacitor must be connected to the VDDCORE/VCAP/VUSB pin (if exist) for proper programming operation:
![]() |
8 Pin (PIC10F Series):
14 Pin (PIC16F Series):
18 Pin (PIC16F Series):
28 Pin (PIC16F, PIC18F Series):
28 Pin (PIC16F57):
40 Pin (PIC16F, PIC18F Series):
40 Pin (PIC16F59):
18 Pin (dsPIC, PIC24 Series):
20 Pin (PIC24 Series):
28 Pin (dsPIC, PIC24 Series):
40 Pin (dsPIC Series):





Post a Comment