Forum - MCS Electronics


FAQFAQ SearchSearch RegisterRegister Log inLog in

programming the 89S51

Post new topic   Reply to topic Forum Index -> BASCOM-8051
View previous topic :: View next topic  
Author Message

Bascom Member

Joined: 08 Nov 2007
Posts: 2

PostPosted: Fri Nov 16, 2007 9:56 pm    Post subject: programming the 89S51 Reply with quote

I read the posting by x_dadu with great interest as I also needed
to program the 89s51 uP's which have pretty much replaced the older 89c51.

My solution was different to his as I had no programer at all.
I post it here in the hope it will be of use to others.

1) The programmer

Download the schematic from [url] [/url]
The text is in Polish but don't worry as you will only need the schematic.

Although this document shows the zl9prg in surface mount, I built mine from "conventional" components.

In the schematic you will see an op-amp and a couple of other components that do an automatic detection of 3.3v or 5v.
If you don't need this feature, simply leave that section out when you build
the programer and simply connect pin 15 of the parallel port to 5v via a
4.7K ohm resistor.

Note that this programer also supports Atmel's "ATF" range of CPLDs.

2) The programming software.

Download it directly from Atmel at
Please note that it's a hefty 6MB file called AT89isp.

Download Update 2.4 which adds support for the following chips:
AT89s8253,At89S2051,At89S4051 and a couple of others.

It's here

Download Update 2.5 which adds user selectable LPT ports

A word of caution....the above software does not happily co-exist
with PonyProg as they both use DLPORTIO.dll and DLPORTIO.sys but different versions of them.

3) Which "DAT" file to use for the 89S51?

Simply use REG51.dat
The 89S51 is functionaly the same as the older 89C51 but has an extra dptr reg and a watchdog timer which is disabled by default.
If you need these extra features download the data sheet, get the register details and enter them into REG51.dat and save it under another name such as 89S51.dat

4) Other utilities

Atmel also has available for free download the following 2 programs which are handy:

A Intel hex to bin file convertor

and the other way round

I have been using this arrangment for a few weeks now and it works a treat.
The software is a bit tricky at first to get used to but you will soon get the hang of it.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic Forum Index -> BASCOM-8051 All times are GMT + 1 Hour
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum