Understanding ICSP for PIC Microcontrollers by ian
Featured

Step 3: How ICSP?

icspdiode.jpg
icspeagle.jpg
ICSP.jpg
proto2.jpg
syndicitusbv0002.jpg
p1000362.jpg
Depending on your design, you can now make all the required connections and program your PIC. There are a few catches that you should know about. Design for ICSP is important. Microchip provides a nice PDF application note about designing for ICSP.

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en011744

Here are some tips and examples of ICSP designs from my previous instructables.

Tip #1, Threat level: Important
Don't connect anything else to the CLOCK and DATA pins (usually RB6 & RB7, PGC & PGD).
Just don't do it. There are situations where very clever engineering types get away with it, but don't do it. The components attached to the pins will skew the clock and data signals, resulting in unpredictable programming. Additionally, if you ever want to use an in-circuit serial debugger, you can't. Just don't do it.

Tip #2 Threat level: Explosive
Always use a diode between the programming voltage and system voltage.
If using MCLR (master clear) on a PIC you must provide some voltage on the MCLR pin through a 10Kish resistor. This is also the pin to which you will apply ~13 volts to enter programming mode. I put a 1n4148 (equivalent) diode between the resistor and MCLR/Vpp pin (as shown in the schematic and rendering below). This keeps the programming voltage on the Vpp pin, preventing destruction of other components on your board.

Tip #3 Threat level: (re)tired
Low voltage programming is holding you back, man.
I have never been successful with LVP. I have never seen it work (consistently) with my own eyes. Just bite the bullet and spend $2.50 to build a JDM2 programmer.
 
Remove these adsRemove these ads by Signing Up
PaulMakesThings says: Nov 27, 2011. 5:21 PM
Great guide. I like your list of pitfalls in step 3, those can be the most confusing part of this.
senacharim says: Sep 20, 2011. 9:18 AM
Were you pulling your PGM pin low/high when attempting LVP?
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!