3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Understanding ICSP for PIC Microcontrollers

Step 3How ICSP?

How ICSP?
«
  • icspdiode.jpg
  • icspeagle.jpg
  • ICSP.jpg
  • proto2.jpg
  • syndicitusbv0002.jpg
  • p1000362.jpg
  • p1000351.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.
« Previous StepDownload PDFView All StepsNext Step »
2 comments
Nov 27, 2011. 5:21 PMPaulMakesThings says:
Great guide. I like your list of pitfalls in step 3, those can be the most confusing part of this.
Sep 20, 2011. 9:18 AMsenacharim says:
Were you pulling your PGM pin low/high when attempting LVP?

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
128
Followers
30
Author:ian(DangerousPrototypes.com)