Page Sponsored by 
Back to Victorian University Electronics Intranet Home Page Mirror.

SPI in-circuit Programmer for Atmel AT89S8252

This programmer uses an Atmel AT89C2051 to program the 8252. No special software for the PC is required, just a terminal program. I have tested the programmer using both Terminal in Windows 3.11 and Hyper Terminal in Windows 98.

Photo showing complete programmer setup. On the right is a DT004 motherboard supplying power to a DT103 40 pin Atmel target board. On the left is a DT003 motherboard supplying power and comms to a DT104 20 pin Atmel board. The DT104 is populated with a 2051 programmed to be the programmer. Download programmer HEX file here. A 9 pin serial cable is used to connect the programmer to a PC. The only other requirement is a cable to connect the SPI headers between the DT104 &am p; DT103 boards. Note that this cable is not a straight through cable.

Photo showing ends of the SPI cable. The black wire is pin 1, which is connected to signal ground. Note that both the programmer and the target have separate power supplies.

Photo showing programmer board. Not many components are needed. I have replaced the DT104 reset circuitry with a single 1uF cap to Vcc. The xtal must be 11.059Mhz. The MAX232 chip is fitted to the DT003 instead of the DT104, hence the empty socket.

Photo showing 8252 target board. Although it is hard to see, you must cut the track between pins 1 & 2 of J1. When the target is running on its own, a jumper will need to be fitted. For programming, remove the jumper or fit on one pin only as shown. The programmer takes control of the reset line. Provided there is no clash with p1.5, p1.6 & p1.7 on the 8252 and a connected peripheral, the target 8252 will run after programming whilst still connected to the programmer.

Close up of DT103 - note reset jumper.

Circuit diagram for the programmer.

The programmer software allows the user to

Screen shot of Hyper terminal with the opening programmer menu.

For programming the HEX files are sent as text files.

Programming is carried out a single HEX file record at a time. After each record is programmed, it is verified.

As each record is programmed it is echoed to the terminal window. The 'V' appended to each record is to show that it has been verified.

The terminal program needs to be setup for 9600 baud, 8 data bits, no parity, 1 stop bit and xon/xoff flow control. In addition to this both Hyper terminal & Terminal need to be setup for the sending of the text files.

Screen shot showing the ascii text settings for Hyper terminal.

Screen shot showing the setting for Text Transfers for Windows 3.11 Terminal.

See sample HEX files for both code and data.

Copying these pages:
Back to Victorian University Electronics Intranet Home Page Mirror.
DonTronics Links:
Home Products Prices Directory Order Contact New Books Files Links FAQ