18 November 2003
The Model A1 Programmer is a companion to the PIC_based Model 01a Control Engine, allowing for in-circuit programming, though it will work with any product that uses the recommended Microchip Inc in-circuit programming setup.
The Model 01a, Model A1, progM01 host software, the hardware design, schematics and printed-circuit CAD/CAM files, are all Copyleft, and licensed under the GNU Public License.
Summary of Model A1 features:
The Model A1 has two connections: a three-wire serial port to the host computer, with which the progM01 program communicates with the Model A1, and a 6-wire connection to the target PIC, in the Model 01, a Berg-type single row connector on .1" centers. If you are not using the Model 01a you are of course free to wire it any way you want.
The host software, progM01, is a relatively straightforward, heavily commented Perl program. For operating systems other than linux the serial driver (serial init, character send, character receive) will have to be changed. The provided linux code is reasonably efficient and POSIX correct, but it could be the simplest character at a time blocking I/O. Communications between the host and A1 are simple command:response character sequences with no fancy timing, designed for simple porting.
See the man page and source for details of operation and communication protocol. The sources of the A1 Programmer are available below.CONSTRUCTION
Unlike the Model 01, I haven't made a printed circuit for the programmer, instead, it's hand-wired on a Model 01 card (see photo). I figured I need only one of them, and there's very few parts, so construction is easy.
Construction is easy, parts are common and available from Digikey, and layout is not critical. Two components deserve mention though. The PIC is a 16F627A, common enough. If you have a PIC burner you can load the program yourself, or I will sell you a pre-programmed chip at nominal cost; email me.
Programming requires +12V, which on the Model A1 is generated by a Maxim MAX662A DC to DC converter, designed for this application. You could modify the circuit to use an ordinary 7812-type voltage regulator, and a diode and resistor to allow switching from +12V for programming vs. +5V for normal operation. I found the MAX662 actually easier to use for the simple reason that the Model A1 can be powered by pretty much any power cube over 8 volts. With the 7812 regulator, you would have to use a 15V or greater power cube. I don't have any handy.
Some care has gone into the design to protect the target (to-be-programmed PIC) from improper power sequencing of the programmer. Should the programmer be turned off while plugged into the target, as the Model A1's PIC browns out, resistor R3 will drive the base of Q2 on, holding the target PIC reset, as well as drive the MAX662A into shutdown.
I'll eventually bundle this junk into a tar and rpm, have patience.
|Model A1 Programmer Adapter schematic||JPEG format|
|progM01||progM01 host-side programmer software|
|progM01.1||progM01 man page|
|ma1.asm||Model A1 Adapter, PIC source code|
|ma1.hex||Model A1 Adapter, PIC hex code|
|ma1.lst||Model A1 Adapter, PIC source listing|
|p16f628a.inc||you'll need this to assemble|