Using the PICkit 2

2 August, 2008 (10:40) | PIC, Tutorials | By: Joshua

Using the PICkit 2

The PICkit 2 is a very common way to program your PIC. It can handle a wide variety of PICs and seems to be the established standard for the normal person to program their PIC microcontroller. Since last time we created a .hex file for this moment, lets go through the steps to actually use it. Again, due to the PICkit 2 Low-Pin Count Demo Board I’m going to be using the PIC16F690 as an example.

I’m assuming if you have the PICkit 2 hardware, it came with the software. It is a typical installation and doesn’t have any weird settings you have to choose. I just updated to version 2.52 but don’t see any really big differences between it and version 2.12 that I was using. If you can’t find your software installation CD somewhere, go to Microchip and search for PICkit 2. One of the first results should go to a page with a PICkit 2 V2.xx Install link.

Make sure your PICkit 2 is plugged into the USB of your computer and that it is properly hooked up to your microcontroller (either through a demo board or a breadboard). If you don’t have them hooked up before you start the program, then the PICkit 2 program will demand you go to Tools -> Check Communication for it to detect the PICkit 2 after it’s connected. Another added step… It should auto-detect your PIC and if everything is kosher, you should see this page:

PICkit 2 Upon Starting

Note the notification box that says, “PICkit 2 found and connected. PIC Device Found.” If it doesn’t have the second line, make sure your PIC is connected properly. Again, the datasheets for the PIC you are using and the PICkit 2 are very useful and I usually have them on hand for quick reference. If you can’t find the answer in there, let me know and I’ll see what I can do.

Go to File -> Import Hex. Find your .hex file and select it. Your notification box may turn yellow and say, “Warning: No configuration words in hex file. In MPLAB use File-Export to save hex with config.” If so, go look at this post. Otherwise, it should say you had a successful Hex file import.

Click on the Write button and things should start flashing on the screen, the green bar should start going back and forth, and your LED might flicker a little bit. If you’ve done everything correctly up to this point, your notification box will be green with “Programming Successful”. Then, to supply voltage to your PIC and LED from your USB port, click on the VDD PICkit2 On checkbox. Your screen should look like this:

Screen after Programming

Your LED should be burning brightly. And that’s it! Everything you need to know to start experimenting and playing around. So, go wild. See what sort of crazy ideas you can do with your newfound power.

As always, leave a comment or e-mail me if you have any questions or concerns.

Comments

Comment from Rhys
Time October 10, 2008 at 8:59 pm

Thanks for that short tutorial, really helped me get up and running fast. Everything was clear and easy to understand, had my lights a burning in about 10min

Comment from Joseph Burke
Time November 24, 2008 at 5:33 pm

I had an engineer working with me on a project and although he has completed the programming with Microchip PICKit2, I have found an error or two in his program which is in a HEX file….

The engineer, believe it or not had a nervous breakdown and I am left trying to find an electronics engineer in the Chicago area who is knowledgeable with the Microchip PICKit2 and can work with me in sweeping the programming and debugging one area.

I was wondering are there a couple of electronic engineers that are out there familiar with PICKit2 that can contact me to discuss a short term project of debugging a script.

Your help would be greatly appreciated and if you can’t help me directly can you point me in the right direction.

Joseph Burke
RADON TECHNOLOGIES INC.
2550 Bainbridge Blvd.
West Chicago, IL 60185
Cell 630.935.2888
Email jburke224@comcast.net

Comment from p.a.wilcock
Time May 9, 2011 at 10:13 am

ive got a pic kit 2,and ive no idea how to use it,any help

Write a comment