Notes on ICSP Programming

By Bob Axtell.


Comments from the PIC Programmer Forum about ICSP Programming.

PGC, PGD, and GND pins of the PIC have to be connected to the programmer. The PGC and PGD pins need to be isolated from whatever is happening on the PCB when there PIC is. The GND can be connected, no problem.

The VDD pin of the PIC has to be connected to the programmer, and NOT connected to the VCC of the PCB, because the programmer does NOT have the power to power your PCB as well as the PIC. The normal way to isolate the VDD of the PIC and the VCC of the PCB is either with a schottky diode (or a jumper or switch). Never allow the PCB VCC to connect to the programmer, it won't work (and MIGHT be damaged).

Finally, the MCLR\ pin must be connected to the programmer, and not connected to the PCB- except that a small resistor (27K-33K is OK) can connect between the CHIP VDD and the CHIP MCLR\. This is used as an extra pullup. Microchip likes to isolate the MCLR signal with a diode because it believes that most programmers cannot handle this small amount applied to the VDD line when the MCLR is held at 13V. In fact, all DIY programmers are designed to handle that small bias without any problem. Its a lot of cost for very little return- so we don't recommend it when using OUR programmers.

That's all there is.


Design For DIY Programmer Hardware Tester - A working ICSP arrangement for DIY USB PIC Programmers

Notice that the schotty diode allows the DIY Programmer to feed its VCC without its VCC being shorted to the PIC's normal power supply. A tiny DIP switch will also work in place of the diode. NOTE: the diode is very convenient when developing the code, but it drops about 100mV of the VCC provided (but was never an issue in my designs.) Simply do NOT power the PIC while programming it.

The 27K is recommended to prevent VPP current from raising VCC. It can even be larger than this. You can use as low as 10K if a diode is placed in series at the MCLR pin, so that when VPP is applied nothing can conduct. But its a needless waste to have that second diode.

The reason for this schematic is to clarify how ICSP is driven by a DIY programmer.

The PIC programmer itself is designed to provide only enough VPP and VDD to program the device, nothing else. With the schottky diode, the VDD load of the product itself is ignored by the programmer while programming. The cap across the chip is very important, and can be as low as 0.01uF and as high as 0.1uF - but it can't be higher, otherwise the rise time needed to enter programming mode cannot be achieved.

The other reason is the way PICs must enter programming mode. Some need to have VCC applied first, while others need to have VPP applied first. That two-step process, together with PGD and PGC at gnd, causes the PIC to enter programming mode.


Design For DIY Programmer Hardware Tester


This pdf file shows diagrams for testing all of DIY's PIC Programmers.

User instructions are enclosed.

Clearly, if NONE of the leds wink, there is a communication problem to the programmer, USB drivers, cable etc, although the internal PIC chip could also be inserted backwards or be otherwise defective.