PDA

View Full Version : Programming environment for Atmel 89c51



Saroche Ali
07-26-2005, 07:44 PM
im to start work on 89c51 uC, some of my friends use assembly to program the chip, but i find it too laborious, there are other language tools as well like C or other, but im not sure which one to use and more importantly which development environment to use??? i know about Keil, ive heard that it uses C, ill try it. One of my friends told me that C program takes up much space in uC memory than assembly, i guess its only the translated program that runs in uC memory, clear me here and which programming language and environment should i use, i have a serial port programmer for 89c51 from a company called as RIMS. Jope to hear from you soon!!!!

maxasimo
07-26-2005, 10:07 PM
Well u can use SDCC ( a free compiler under GNU...from sourceforge.net ) to code 8051 family of uC in C...

3d
07-27-2005, 07:55 PM
well ali. i would say that sdcc is indeed the compiler of choice for c proraming the uC.
but as u might have realised by now that it has a tendency of using up well too much rom space on the 8051 and hence u have less control over the code length u can write.
but to overcome this u have the option of including assembly code in sdcc whenever u feel that u need absolute control over your code ......just use the following format.....

c code
c code
c code
.........
.........
..........
_asm
assembly code
assembly code
.........
..........
..........
..........
end_asm
c code
c code
.
.
.
.
.

as u can see that by inserting this assembly code block u can have a better control over the code.
by the way learn 8051 assembly.its damn easy and interesting ......we have used entirely assembly in our hexapod and i must tell u that its actually easier than c programming .
if the above doesnt work.... check the help files of sdcc for the exact syntax for inserting assembly code.

cheenu
08-02-2005, 06:25 PM
I compiled and installed SDCC. But the problem is i dont know how to write the program. I know C quite well. I learned assembly for 8051 recently.
But i dont know how to write the C program for the microcontroller AT89S52. I read through the book "Embedded C programming and the ATMEL AVR" but couldnt use that C to program AT89S52. I dont find any header file for this particular uc AT89S52 in SDCC. So i dont know how to proceed with.
I also considered doing assembly programming and downloaded the ATMEL AVR Studio from the ATMEL site. But in that also i dont know how to set to this specific uc. All the AT89 series is disabled there. Any help to program in C or assembly for At89S52 will be very useful.

Thanks a lot,
With regds,
Cheenu.

3d
08-05-2005, 09:51 PM
if u really want to program the at89s series in c then u can try the ' keil c' compiler........it supports all the header files and is really easy.

if you want to program it in assembly use ' 8051 simulator ide' google it and download it from the net.