In this post I will teach to setup a circuit to program any PIC that the PICKit is allowed to program. Although I will be using the PIC 18F252 I wanted to write a tutorial that will be general enough so that you can program any PIC you choose.
Before we begin: on top of the PICKit you’ll also need an ICSP header which is used to connect the PICKit to the bread board.
Let’s get started.
How to Know Where to Connect What
Your PICKit has six holes at its end, five of these holes are connected to five respective pins in your microcontroller. The other two, AVDD and AVSS are used to debug, but we won’t be needing these today.
The PICKit comes with a manual that shows a schematic of how to connect it to the a microcontroller. Pin one of the PICKit is located where the white triangle on the pickit is pointing not where the circuit is actually showing it.
Unfortunately micros aren’t labeled like this on the surface. Don’t worry, all PICs have their own pinout sheet which you can easily find online with your favorite search engine.
This is the pin out sheet for the PIC18F252, all I did was google “PIC18F252 pin out sheet”. I have circled the pins mentioned above in the schematic.
The Circuit In Real Life
If you are new to electronics you might have some trouble deciphering the schematic, specially with that resistor between pins one and two of the PIC. They say that a picture is worth a thousand words, so I’ll let you peek at the circuit set up I made.
In this picture am using a 4.7k resistor, you’ll be powering the circuit with the PICKit; pin 3 of the PICKit is ground.
Here is also a colored version of the circuit.
And a close up
And last but not least the PICKit3 connected to the circuit.
How To Get Code Into the PIC
The software part of programming the chip requires its own post. I’ll post a link to it here as soon as finish recording it, (it will be a video).