Want to get into
microcontrollers but don't have the
cash for a fancy
development kit? Fear not, humble experimenter! You too can program
PICs for
fun and
profit! Below is my favorite of the
minimalist PIC programmers. It was designed
many moons ago by Erik Hermann and posted to the
PICLIST. It costs about $5 in
Radio Shack components and programs the popular
16x84 and other flash based parts, as well as some
serial eeproms and
Atmel AVR micros. Shown here is the schematic for using it with a 'x84:
TxD ---*-----------------------------
(3) I I
--- ---
I I I I
I I 2k2 I I 10k
--- ---
I I\I I
*-------I-I-----*--------- I
\ I I/I I I I
\----\ I + I I
/\ \ --- 14 I I 4
/ \ 5V6 --- --------------
---- 10u I I Vdd Vpp I
I I I I
I I 5 I I
GND ---*---------------*----I Vss I
(5) 22k I I
----- 12 I I
RTS ---------I I----------IRB6 (clock) I
(7) ----- I I
----- 13 I I
DTR ---------I I----*-----IRB7 (data) I
(4) ----- I I I
2k2 I I PIC 16C84 I
CTS ------------------I I------------I
(8)
The left hand side depicts the pins on a
DB9F connector, intended to plug into your
PC's
serial port. For the
schematic illiterate, the parts are labelled thusly:
- 2k2=2.2k resistor
- 22k=22k resistor
- 10k=10k resistor
- 10u=10 microfarad electrolytic capacitor (or tantalum)
- 5v6=5.6v Zener diode, stripe/band denotes side arrow points towards
- other arrow looking thingy without wings=any small signal diode. 1N914 or 1N4148 will do nicely. Polarity follows the same rules as above.
- stuff on the right side=pins of a DB9F connector. This is the female 9-pin D-sub connector. Buy the solder cup type, not the crimp type. It's easier this way.
My recommendations: use an 18 pin
ZIF socket for the chip. It's much friendlier and faster. Keep all the wires relatively short. I say this because I have had bad luck building the electronics inside the DB9 shell and putting the socket on the end of a cable between the two.
Next step is getting a
development environment going. If you run Windows, go to www.microchip.com and get the
MPLAB software kit. Then head to http://www.h2deetoo.demon.nl/ for the program
IC-Prog. When setting up IC-Prog, tell it that you have a
JDM compatible programmer. If you're using
Linux, get
picasm (available on
Freshmeat) and
prog84, available at http://home3.inet.tele.dk/frda/picasm/prog.html . Prog84 comes out of the box with a configuration file set for this kind of programmer.
Good luck, and happy coding!