Instructables
Picture of PURPIC, the wearable PICkit2 clone
One of my very first Instructables was a stripped down PIC programmer based on a design by David Tait using through hole transistors and resistors glued to a piece of cardboard. Oh, how times have changed. And as usual, I'm still 7* years behind those changed times. My latest project is a remake of today's hottest 7-year-old PIC programmer, the PICKit2!

*there, fixed!
 
Remove these adsRemove these ads by Signing Up

Step 1: An extremely brief history of the PICkit2

pics.jpg
Microchip launched the PICkit2 in 2005. It is a hugely popular device that programs and debugs a wide array of PIC microcontrollers and EEPROMs. Even though it has long been superceded by the PICKit3 and the ICD3 programmers, there are still a variety of features which make the PICKit2 quite useful (and cheap) for specific applications.

In addition to working with Microchip's MPLAB IDE as both a programmer and debugger, Microchip also created a nifty standalone software for the device which is very easy to use. There is a Widows GUI version and also a command line version of the programming software. The engineers even added a "programmer-to-go" functionality, which allows the PICKit2 to burn chips with no computer at all. So even though the PICKit2's MPLAB debugger is painfully slow, all those other features are quite useful for low volume batch programming on a budget. So even though I celebrated the PICKit2's 7th* birthday by buying an ICD3, it will never make my PICKit2's obsolete.

Step 2: An extremely brief history of PICKit2 clones

Picture of An extremely brief history of PICKit2 clones
pp7.jpg
Some years ago, Microchip decided to release the firmware and schematics of the PICKit2. Not long after that, the first of countless clones was born.

Many hobbyists stripped down the programmer to the bare essentials. Other commercial variants were made with robust ABS cases and a more secure RJ-12 connector. One version looks more or less exactly like the original from the outside, and it sells today for around 20 dollars!

The schematic is viewable at this link. Scroll down to page 81-82, or click on "Appendix B: Schematic"
http://ww1.microchip.com/downloads/en/DeviceDoc/51553E.pdf
thats some good work. im remaking my pickit2 clone (first one was made on perf board and still works) my original was 100% through hole, but didnt have the fets or opamp to power the target board. i just made a new one thats 2" square (much smaller than my original) and everything fits on 1 side of the board (no vias at all). just wanted to thank you for confirming that a 22uf cap works for the vpp pump, because that is what i had on hand.
klee27x (author)  bowlofpudding12 months ago
Nice to see people still using this great device. I stopped after building 3 of them for my own use. I have to admit, I made this thing too darn small. It was no fun at all to solder with no mask! I have one for general use, plugged into my computer. I have a full battery powered version on an arbor press, for batch flashing individual boards. And I have one installed on a CNC mill. The mill is run with a totally custom control board and an old computer power supply. A PIC is the brains, and it runs the steppers in unipolar mode via 12 FETs. It flashes panels of pcb's, using the indicator LED signals of the PICKIT2 to verify programming before continuing to the next pcb. I flash the control board with the number of rows per panel, columns per panel, the number of steps for X and Y directions (4 steps per mil), and the distance of Z axis movement in hexadecimal into the EEPROM to switch between different boards!
so are you saying you have a setup to just place the boards down, and it goes and selects the board and programs it autonomously? thats pretty advanced. i dont even bother putting the icsp header on my boards anymore, i just flash a usb bootloader on the pic before installation. and i agree the compact placement makes fitting the components complicated, ive been using a solder resist because some chips ive been using are the qfn versions. i did have trouble with the circuit from the pickit2 manual though, something must not have been soldered right cas it kept saying there was a problem with VDD but i added some flux and reheated all the joints and now its fine. by the way, vdd should go up and down when changed in the pickit2 application correct? because my board the VDD always stays around 4V, im thinking my circuit has an error. end of long winded post
klee27x (author)  bowlofpudding12 months ago
No. The mill is for batch programming of large amounts of small panelized pcbs. I can put down, say, an 8x4 panel of 32 pcbs on the mill. Setup the PICKIT2 for P-2-Go. Flash the control board with the panel dimensions. Then press a button and the mill flashes the pcbs, one at a time. If there's a programming error, it will pause indefinitely until I fix or override the error. I have flashed over 500 pcbs in about an hour or two, and I didn't have to sit there and watch it. Just swap out the panels at my own convenience.

Yes, the Vdd should be adjustable. I think it goes from 1.8V -5.5V, or thereabouts. The clock and data lines will automatically mimic this voltage because the transistors on those lines act as voltage followers. There's a lot of "stuff" in the schematic that people frequently omit, but everything in there is quite useful and well thought out. If your programmer Vdd doesn't follow the voltage setting in the software, then it sounds like you have a bug somewhere.
klee27x (author)  klee27x12 months ago
I think the Vdd voltage control circuitry should be easy to identify. The schem is pretty well documented and labeled. Sorry I can't be more specific. t's been a long time since I looked at the schematic.
cody3052 years ago
I have no idea what these little programmable chips and stuff are used for, do you build robots with them? Build your own cell phone? What kinds of things can you make that would be worth all this trouble? Or do you just do it for fun like a hobby? Thanks!
TDWay cody3052 years ago
AC freezing up is an easy fix , go to the automotive parts store buy a refrigerant refill kit, around $34.00 USD with the engine turned off just add refrigerant (134A)
Connect it to the large AC Line, 1/2 a bottle by weight maybe a little more.
for best results take your car to a garage and have them charge the AC unit.
klee27x (author)  cody3052 years ago
That's a good question. Microcontrollers are a computer on a chip, complete with integrated memory, digital and analog I/O's, timers, PWM modules, and all sorts of neat things.

Microcontrollers control the stuff you have all around you. It's not just cell phones and robots. They also control the mundane things that don't take an EE degree to make or modify. I'm talking about elevators. Microwave ovens. Carpet cleaning machines. Coffee makers. They're even appearing on such things as heat guns and other power tools, to provide information such as temperature and battery life.

So... you could make you own microwave oven, carpet cleaning thingy, coffee maker, etc. Or you could modify the above to work more like you envision, rather than how someone else decided you might like it.

You could use them for such mundane things as making a simple on/off toggle switch! I have used dozens of microcontrollers to do exactly that. Why? Cuz combined with a tiny MOSFET, you can control a lot of power at the touch of a tiny microamp button that will fit anywhere, and the micro will draw practically no power when it's asleep.

Some of the things I've done with microcontrollers are viewable in my other Instructables. I've used them to make an LCD display temp-controlled soldering station. And a heat sealer that uses just one push button for both operation and for programming the impulse delay. (That firmware also makes for a great programmable delay fireworks igniter!) And of course, you may also see where I used one to make a simple toggle switch on a small LED flashlight.

One of the things I'm currently envisioning is a lab power supply and soldering station combo, using a single encoder knob to adjust PWM-controlled voltage, current, and soldering iron temperature, with 4 programmable saved settings on the power supply, and all the info displayed on an LCD display.

Lots of today's IC's are even designed with features that require a microcontroller to take full advantage of. The LT1308 I used for the DC boost on this programmer is one example. It has pins on it that are designed with the purpose of providing a low battery warning to a microcontroller.

If you've ever heard of the Arduino, then there you go. Anything you can do with an Arduino, you can do with a single chip. The Arduino just has extra stuff on it that makes it easier to use for a beginner, quicker to develop stuff for the veterans, and easier to share with other hobbyists. It's wonderful. But sometimes, all you want is a 50 cent power switch circuit that fits on a dime.

A microcontroller can also replace logic chips (albeit not quite as fast in many cases). The computer that landed men on the moon was built using something like 50 logic chips. That could be done on a single high speed microcontroller, today.
cody305 klee27x2 years ago
You just gave me an idea for an application for these. When I have my car A/C on with the blower on low speed, eventually the evaporator coil freezes up and I get no air coming through. Then I have to turn of the A/C compressor switch until the blower melts away the ice and I can get cold air again. If i had an automatic switch that turns the compressor on and off, say five minutes on, and one minute off, but variable time for both on and off, that would allow me to fine-tune it so it would never or rarely freeze up. Is that something a microcontroller could do? Are there existing designs for a circuit like that? What would it cost for all the parts? Thanks!
klee27x (author)  cody3052 years ago
Yeah, that's something a microcontroller can do. I think that might be overkill, though, for someone that doens't know how to program one. A 555 timer chip could do much easier for the uninitiated. Google "555 timer chip" and you'll see what I mean.

Hmm. Try this. Use a comparator to turn the coil on/off based on temp. Put a thermistor as one half of a voltage ladder onto the coil. That goes to one input of the comparator. Then put a potentiometer on the other input of the comparator. Now the coil automatically cuts off when it gets too cold, and you can adjust the cutoff with the potentiometer.

Course, you need to use the output of the comparator to drive a transistor that drives a relay, which disconnects power to the coil.

The hardest part about working on a car is identifying and getting to the right wires!
I call that last picture (it occurs with relative frequency among my cats as well) "Syncroni-kitty".
That picture really scares me at the thought of kitties scratching the couch with their nails = (

A nice pic indeed.
klee27x (author)  ildegiron2 years ago
I have long given up on worrying about that kind of thing. Cats will be cats. They are incredibly resistant to learning what I wish they would or wouldn't do. And I have decided they make me happier than nice furniture or security deposits. :)
wbond12 years ago
I have a question, can this device extract a program from an eeprom? I have a collection of about 11 eeproms from the mid 80s that we have lost the program to and we need to extract it, but don't know how or where to go to have it done, can you help me with this please.
klee27x (author)  wbond12 years ago
According to my PICKit2 software device list, it can read the following EEPROM families:
11LC
24LC
25LC
93LCAx,C
93LCBx,C

I have no clue as to the amount of standardization between different EEPROM manufacturers or between different decades. I hope you have the datasheet for your parts? And that the parts aren't read-protected?

I wish I could be more help, but I don't have much experience using EEPROMS from this decade, let alone from the 1980's. :(
ciroman2 years ago
" My latest project is a remake of today's hottest 15-year-old PIC programmer, the PICKit2!"
"Microchip launched the PICkit2 in 1997."

Umm...

Launched in 2005?
Davak72 ciroman2 years ago
Yeah, I don't know where the 1997 came from. Here is wikipedia on the subject:
http://en.wikipedia.org/wiki/PICKit#PICkit_2
klee27x (author)  Davak722 years ago
Hmm. Yeah, I dunno either. Thanks for the heads up, guys. I have amended the Instructable.

This is good news! I'm only 7 years behind. At this pace, I should have my first smart phone before the end of the decade. :)
Davak72 klee27x2 years ago
Haha awesome.

Also, great instructable! The tip about denatured alcohol for hot melt glue will certainly come in handy! (I find it very easy to mess glue up)

Also I read your breadboard ible. When I got my breadboard, the first thing I did was take the back off and connect all the power bars to the screw connectors built into the top of it. It was nice to see I wasn't the only one not wanting to repeat connections that are used all the time. But now I'm going to have to make some of those leds with the smd resistors on the small board!

Thanks for the tips,
David