SPI in-circuit Programmer for Atmel AT89S8252

horizontal line

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

Photo showing complete programmer setup. On the right is a Dontronics DT004 motherboard supplying power to a Dontronics DT103 40 pin Atmel target board. On the left is a Dontronics DT003 motherboard supplying power and comms to a Dontronics DT104 20 pin Atmel board. The DT104 is populated with a 2051 programmed to be the programmer. Download programmer HEX file here. Note: As our server doesn't allow files with the extension .hex, the file is called 8252prog.txt and needs to be renamed to 8252prog.hex after downloading. 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 & DT103 boards. Note that this cable is not a straight through cable.

 

photo showing ends of the SPI 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 

Photo showing programmer board. Not many components are needed. I have replaced the Dontronics 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

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 photo of DT103

Close up of DT103 - note reset jumper.

 

circuit diagram

Circuit diagram for the programmer.

 

The programmer software allows the user to

 

 

screen shot of Hyper terminal with the opening programmer menu

Screen shot of Hyper terminal with the opening programmer menu.

For programming the HEX files are sent as text files.

screen shot

 

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

screen shot

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 ascii text settings for Hyper terminal.

 

screen shot showing the setting for Text Transfers for Windows 3.11 Terminal

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

 

See sample HEX files for both code and data.