2003-06-30

Atmel AT89Cx051 Programmer

Atmel AT89Cx051 Programmer

I developed this design from scratch to be a cheap and easy to put together programmer. I had no access to a 2051 programmer during its construction so I couldn't just use the conventional designs that utilise another 2051 as a controller for the programming and serial interface. I decided I needed to build my own, squeezing the additional signals I required out of the PC parallel port using a serial-parallel latched shift register. Besides it was fun :-)

The 74595 is a very useful chip for turning three bits into as many as you like. In this design it supplies the mode setting bits for the device being programmed, and the voltage control signals for the RST-Vpp and Vcc pin supplies. I decided against a more complex (and conventional) design using tri-state latches, instead utilizing all the output capable bits of the PC parallel port. This does force the the port to be SPP (bidirectional) capable, but almost all current ports will work just fine. Even some of the classic ISA cards implemented with 74LS logic can be converted to bidirectional ports by cutting a track or two and hooking up the R/W signal to the right tri-state buffer pin. If you have an modern AT or ATX motherboard it should be a complete non-issue.

The design is a bit unusual in using a pair of 78L05 voltage regulators. One for each pin. A zener diode is used to raise the regulation point on the RST-Vpp regulator supplying the programming voltage, and a transistor shorts this diode out to bring it back to 5V, as required. The other regulator feeds the Vcc supply. Both pins are independently controllable, giving a by-the-book programming sequence.

The clocking lines for the 74595 have noise rejection networks. Long cables have not proved to be a problem, but in prototyping it was found they are necessary for reliable clocking once cable length exceeds a few metres. The circuit diagram is available for your study. I used eagle this time, instead of Xcircuit for schematic capture, as the board was to be sent off to be made by a professional board house in Asia.

Note that this design, like all my work, is © copyright. I will seriously kick your rear end if you try and make money out of it without giving me a share. :-) Please purchase a unit off me if you like it. Pre-built, ready to go, units are available for just $69 AUD, which includes data cable and supply (a pair of 9V batteries or any source of DC > 15V you choose the termination).

Lastly, here is some Linux Programming Software for the design. It understands the various sizes of the line and will automagically work out what chip is plugged in. The interface is in much the same spirit as my EEPROM programmer, an interactive command line tool with single char commands:

89Cx051 Programmer Driver (c) 2003 Alan Yates <alany@ay.com.au> http://www.vk2zay.net/ $Id: at89cx051-prog.html,v 1.2 2004/08/29 12:17:35 alany Exp $ Commands: q quit ? this usage message e erase chip s dump signature block for inspection d dump flash as hex for inspection r <file> download flash into local file w <file> upload local file into flash

Also included in the package is a more intelligible circuit diagram, in both PostScript and JPEG format. I use the sdcc C compiler and the as31 assembler for my 8051 projects. The hex2bin tool is handy for use with these development tools and my programmer. This website has an excellent summary of the 8051 architecture. I use this site for a rapid instruction set reference.

Leave a comment on this article.