View Full Version : at89s52 uC programming

01-06-2005, 12:20 AM
i've this at89s52 uC that i've been trying to program for the past several days but haven't had any luck. i don't have a kit/board for programming and don't plan to use any such board either. from what i gather from the net/data sheet, it can be programmed without using such elaborate hw. has anybody programmed this particular uC (using free software only, pref for linux)?
'cause in that case i have a few questions to ask..
even otherwise, can the uC be programmed without a programmer board?

sharad birmiwal

01-06-2005, 08:36 PM

You can find free software that would fit your project at this address:


under "Downloads".

They also have a forum that might help you.

01-06-2005, 10:40 PM
this might seem as a very stupid question, but after reading so many things, i am a little confused. i know my uC is 8052/8052 derivative. you ask me to try "SES51C" which is a "8051 Editor,C Compiler, Assembler and Debugger". will this program work for me?

01-06-2005, 11:06 PM
anyways, i'm using sdcc and it's working fine, ie i get some ihx file from it. using a tool 'packihx' i can get an intel hex format file from that. my real problem is the programmer.
i'm using sp89 (http://www.xs4all.nl/~sbolt/e-ser89.html) which should also program at89s52 (it supports at89s53). for programming the uC, since i don't have access to a programmer board, the circuit that i'm making is the one as given on the above link + connecting two capacitors and a 11.0592Mhz crystal at xtal1 and xtal2 and connecting Vcc (Vcc=5V) and Gnd.
when i try to read program memory (+ generate checksum), they come out to be different on every run. chip erase doesn't work either.
now i can't be sure if the circuit is sufficient or if there is some software issue.
from what i get from the datasheet of at89s52 (http://www.atmel.com/dyn/resources/prod_documents/doc1919.pdf), for serial programming (page 25), all they have are the 2 capacitors and clock connected, and arrows pointing in towards the uC at SCLK, MISO, MOSI and RESET pins. so i have that part made.
for sp89 page, they hae a little circuit, and below the diagram, it says the uC with other circuitry, which i am assuming to be just the clock part.
for the software part, when i run sp89, i use a clock speed of 0.3Mhz (<11.0592Mhz/16) and i've tried both -i52 and -i53 (for at89s8252s and at89s53s)

all the help is appreciated. would you require any more information?

01-07-2005, 03:03 AM
download software called keil from www.keil.com
you can write your program in C language in that

to make programmer for 89s52 you can go to
http://chaokhun.kmitl.ac.th/~kswichit/cheapcable/index.html or

also a good link is


01-07-2005, 07:30 AM
thanks for the post. i've already tried running keil, but they download option or something was always gray. does it allow downloading, or only programming in c?
also, have you tried programming this particular chip with this combination (programmer + keil's uVision)
sharad birmiwal

01-08-2005, 11:38 AM
I want to start embedded programming, where can I get a good general purpouse programmer and at what cost. and what are the other tools needed like evaluation boards & compilers as I don't have any idea of this field but I want to learn.

01-08-2005, 10:02 PM
got an email from the author sp89, it's not supposed to program my uC.. hehehe, silly me. anyways, i had started writing my own programmer for linux.. current status is that it can erase the chip.. pretty cool

anyways, thans everybody
sharad birmiwal

Sunrom Technologies
01-11-2005, 04:44 PM
We have released 89 Series programmer under GNU at this popular site,

http://chaokhun.kmitl.ac.th/~kswichit/89prog/index.html (http://chaokhun.kmitl.ac.th/~kswichit/89prog/index.html)

Sunrom Technologies[/url]

12-03-2005, 03:42 PM
So guys finally which software would be the easiest to program 89S52?