You are on page 1of 6

ATMEL 89C Series Flash

Microcontroller Programmer
Ver 1.1
M Asim Khan, asimkhan@sat.net.pk
Build your own flexible & easy to built Atmel 89C series flash programmer

Introduction
This programmer was designed in view of to be flexible, economical and easy to built,
the programmer hardware utilizes the standard TTL series parts and no special
components are used. The programmer is interfaced with the PC parallel port and there is
no special requirement for the PC parallel port, so the older computers can also be used
with this programmer.

Devices
At present the programmer software supports the following Atmel devices
AT89C51
AT89C52
AT89C55
AT89C1051
AT89C1051U
AT89C2051
AT89C4051
Note: For 20 pin devices a simple interface adapter is required.

Hardware
Figure 1 shows the circuit diagram of the Flash Programmer, the programmer is
interfaced with the standard parallel port of the PC. As shown in the diagram U1 is used
to control the data flow between controller and the pc, U3 latched the low order address
byte and U4 latched the high order address byte, while U2 is used to generate the control
signals for micro-controller to be programmed. The power supply section uses U6 to
generate the logic 5V supply while the U5 is used to provide the programming supply

voltage to controller. The power to the circuit is provided by a wall adapter of 15 to 18V
output, normally a 15V type adapter will provide a 19~20V output voltage. As shown in
the diagram the crystal X1 can be replaced by a resonator in that case capacitors C4 and
C5 are not required, the pcb has the provision for both type of devices.
Adjustment procedure for P1 and P2 variables.
1. First adjust P1 to get the 12.75V at the output of LM317 regulator. Make sure
transistor T4 is off or
temporarily connect the T4 base to ground.
2. Now temporarily short the collector of transistor T4 to ground.
3. Adjust P2 to get the 12.0V at the output of LM317 regulator.

Figure 1: Circuit Diagram of Flash Programmer V1.1


Figure 2 shows the circuit diagram of the interface adapter card required for the
programming of 20 pin Flash devices.

Figure 2: Interface Adapter circuit diagram

Constructing the Board


The prototype board may be built using universal PCB with point-to-point wiring. If you
want to make a PCB, get the PCBs.zip file which contains the printer files *.PRN for HP
Laser printer and the plotter files *.PLT for the HP Pen plotter. Figure 3 shows the
component layout of the programmer pcb.
For printing the files on laser printer issue the following dos command
COPY FILENAME.PRN PRN/B
For the bill of material of the project get the file Pgm89bom.txt
The schematics and the pcbs of the project were designed using OrCAD software.

Figure 3: Components layout of Programmer PCB V1.1

Software
Pgm89.exe file is used to run the programmer. This is a DOS program which can also be
used in Windows 95 and 98 msdos window but not in windows NT. The main screen of
the program is shown in figure 4.
Following are the main features of this software,

Read and Write Intel Hex File


Read Chip info
Verify from hex file
Program Lock Bits
Fill buffer & Display buffer
Parallel Port selection LPT1, 2 & 3
Remember the previous settings of the programmer

Note: In order to insure safe insertion & removal of the u-controller from programmer zif
socket make sure programmer power supply is turned on before starting the program and
the red LED D2 must be turned off.

Figure 4: Main screen of the program PGM89.exe

Future Enhancement
The programmer hardware is also capable to program the following Atmel devices, the
next version of the software also include these devices.
AT89S53
12K flash with SPI and wd-timer
AT89S8252
8K flash, 2K e2rom with SPI and wd-timer
AT89C51RC 32K flash, 512 byte ram, dual dptr and wd-timer
AT89C55WD 20K flash with dual dptr and wd-timer
A separate program PGME2.exe is also under development which can be used to program
the following
parallel EEPROM devices using a simple interface adapter with the above mentioned
programmer.
28C17
28C64
28C256
29C256