How To Program a PIC Microcontroller With the PicKit: Circuit Set Up

by Miguel on January 22, 2011

in PIC

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.

PIC ICSP Header

ICSP Header

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.

PICKit programming schematic

PICKit 3 Programming Schematic

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.

PIC18f252 chip

PIC18F252 Pinout Sheet

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.

PIC microcontroller in breadboard ready to be programmed

PIC microcontroller ready to be programmed

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.

PIC micro in breadboard

PIC micro in breadboard (colored)

And a close up

PIC in breadboard close up

Close up of PIC programming set up

And last but not least the PICKit3 connected to the circuit.

pickit3 setup circuit

PICKit Inserted into the bread board

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).

Next post: