Build an RS232 PIC Programmer

What's my Motivation?

I already have a universal device programmer that can program PIC chips. I bought it from JDR Microdevices years ago and it still works fine. The trouble is the programmer has an ISA bus card and these days you can't buy a motherboard with ISA slots. I do have an old PC that I can use- but its a royal P.I.T.A to have the development environment on one system and the programmer on another. Looking out on the web there a plethora of commercial offerings and circuits for the the programming of PIC devices. I chose to implement the JDM programmer, so called because these are the initials of the guy who came up with the design.

This circuit is unusual because it uses the signals of the RS232 port to provide all the voltage waveforms necessary for programming the 16C8X, 16F8X, 12CXX and 12F8X range of PIC devices. Doing this in a generic fashion requires a certain amount of jiggery pokery with zener diodes and charge pump circuits. The good news is that the end result won't burden you with yet another wall-wart to plug into your powerstrip.

Circuit Design

This circuit is the same as that presented by Colin Mitchell at Talking Electronics. He in turn has largely copied the JDM design- but has added some LEDs to allow the observation of key activities within the programmer. I have changed some mechanical aspects. ie- I have added a DE-9 to the board so that I don't have to mess with non-standard serial cables.

The schematic file for the ExpressPCB schematic capture program can be downloaded here

PCB Layout and Fabrication

ExpressPCB provides free schematic capture and PCB layout tools that are suitable for doing small circuit designs. After you have your PCB design complete, you send it to them using the internet. For around $60 you can have three mini-boards (3.75"x2.5") delivered to your doorstep. These are double sided with thru-hole plating. You can of course expose and etch your own boards at home, but the ExpressPCB service is very convenient and the quality is excellent.

This circuit is relatively small, and the miniboard size leaves a lot of room to spare. The normal layout of an 18-pin DIL IC has been expanded to accomodate the larger footprint and bigger hole size of an 18-pin ZIF socket. An in circuit programming socket has been added to facilitate the programming of chips that are soldered onto another board. Most of the basic layout is driven by personal ergonomic desires- such as they are.

The PCB layout file for the ExpressPCB PCB layout program can be downloaded here

And a few days after we submit the design the boards show up. There are actually three boards in the "mini-board" service but by the time this picture was taken I had already soldered one up.

Construction

Construction is very straightforward. The board has plenty of space and the soldering is all of a non-challenging thru-hole variety. The board has been designed with enough space for an 18pin ZIF socket, and that's what I have installed on this board. There was enough space to add some handy nomenclature about how to place non 18-pin devices.

Usage

Here's the good news: if you build a popular design you will find software support already exists. You can of course delve into serial port and PIC programming if you so wish, but for the time being I use the freeware IC-Prog application. This supports programmers of the JDM type and supports a good range of Microchip devices.

Using the PIC programmer is very simple.
  1. Plug in the programmer.
  2. Insert a chip into the ZIF socket.
  3. Configure IC-Prog with correct programmer type and serial port.
  4. Erase the chip (if required).
  5. Load the chip data as produced by the assembler.
  6. Set the chip configuration (OSC,WDT, etc.)
  7. Program and verify the chip.

Resources

Here are some handy links for building and using the RS232 PIC programmer.