You are on page 1of 6

Easy-DownloaderV3.

0 for 89C51/89C52/89C55WD
not recommended)

Wichit Sirichote, kswichit@kmitl.ac.th


Build this new version of Easy programmer. The programmer board was speciallydesigned for 89C55WD.

I decided to redesign the Easy programmerV2.0 for 89C55WD. Since the programming algorithm and hardware setup of the 89C55WD quite differ from 89C51/52. Below is summary of the differences.

The signature byte is located at 0x100,not 0x31! It needs +6.5V to supply the device whenerase and lock bit programming! Chip erasing needs sequence of power thedevice up and down! The lock bit programming requires 100us!

HARDWARE Figure 1 shows the schematic of the newversion, Easy programmer V3.0. We see that it needs more i/o pin, so Iadd the 8-bit latch, 74LS373 to provide A0-A7. The ALE control signal is software controlled using P1.7. Port 0 of the master chip ties to Port0 of the target with 10k pullup. A8-A14 still uses Port 2. Look at theA14, the 89C55WD uses P3.4 for A14. The programming mode selcection ismade by using P3.2-P3.7. The prog pulse still uses P2.7 the same as EasyV2.0. When programming, P3.0 of the target chip was used to be RDY/BSYline. The master chip read this status through P1.6. However for 89C51and 89C52, instead the P3.4 of target chip is the status line which istied to P2.6. The firmware will switch P2.6 to be the output bit (A14)for 89C55WD and to be input bit when monitor the status line for 89C51/52.P1.5 of the master chip controls the output of U7, if it set the outputwill be +5V and if it clear, it will be +6.5V. Q3, the PNP transistor controlsthe output of U7 to supply to the target chip VCC. The signal that controlQ3 was tied to P1.2 of the master chip.

FIGURE 1:Schematic of Easy-Downloader V3.0 FIRMWARE The main program is a simple forever loop,reading the character received through SBUF and execute the command.

for(;;) { getcommand(); prompting(); setcounter(); erase(); write(); read(); lock(); read_lock_bit(); printchksum();

getinfo(); PGMparameters(); }
Details for each function can study fromthe source code EZ56.C. Here is a sample of using command underHyperterminal with 9600, 8n1 setting. When press ENTER, we get,

Easy-Downloader V3.0 for ATMEL 89C51/52/55WD > Suppose the 89C55WD was programmed andinserted on ZIF socket, press command s200 and command 'r', we get the200 bytes internal code.

>s200 ok >r0140FF0157FFFFFFFFFFFF0200510140FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF75811AD2AFD2 A9D28C12005A12001 B80FB438CDC050832050832740075F000F50985F00A740075F000F51585F0167480 75F025C0E0C0F 0120C0015811581120C4F79307A0EE98AF0C0E0C0F0120C23158115811201F31201 8B12020612089 51202561203751204811206471205EB1206F61208B51209A2020096227F09120CDE7 40078FC120CD 2F6 ok >

Now use command 'g'. We see that the chip89C55 was found.

>g found 89C55-12V nonblank 3744 bytes bytes counter 200 ok

> Let try with command 'b' to read lock bit1,2,3.

>b lock bit 1,2,3 = 000 ok > 000 means the lock bit 1,2,3 are not programmed. Try lock the code by programming the lockbit 1,2,3 with command 'l'.

>l ok > Then read again the lock bit with command'b'.

>b lock bit 1,2,3 = 111 ok > Now the lock bit 1,2,3 are programmed.Try command 'r' to see internal code again.

>rFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFF FFF ok >

We see that all codes are FF. Note: the command shown above can be executedunder communication program, say Hyperterminal with 9600 8n1 and no flowcontrol setting. When programming the chip the PC softwareEZ3.1or EZ4will help send the hex code to the board. PROTOTYPE The 74LS373 is placed on the left hand.The right most is U7, 7805 with nearby two silicon diodes. Above the ZIFsocket is 2n2907, Q3. For those who built the board like me (using universalPCB) can then modify it easily. However, the layout is now under preparation.I will post it when available soon.

FIGURE 2: My prototype adapted from Easy V2.0

Hardware and Firmware modifications I added the 8MHz Xtal to the pin 18,and19 of ZIF socket. And cut the oscillator signal from master chip. New firmware EZ57.HEXandEZ57.C ERASING PROBLEM with LOCK BIT programmed In case of the chip was locked and thewindow program cannot erase the chip caused by signature byte is not correct.Try using communication program, XTALK or Hyperterminal with 9600 8n1 noflow control, and perform the following step;

1. enter command 'e', 2. power the board power down and up, 3. enter command 'e' again, 4. power the board down and up again, Check lock bit by command 'b'.

DOWNLOAD

Schematic: Easy3.pdf Firmware (not recommended): EZ56.HEX, EZ56.C Firmware updated 29 Sep 2002: EZ57.HEX and EZ57.C PC Software: EZ3.1,EZ4

Contribution to Easy Downloader V3.0

Layout: EASY3.MAX The layout MAX file and BOM (Orcad 9.1) made by Vikram Tamboli from India [Maharashtra-Pune].

29-03-2004

You might also like