hi
iam doing a mini project on solar tracker,it uses AT89C51 now i have a program for the micro controller, the only problem is that it is in a wierd type of C(my friends told me itis embedded c) and doesnt use assembly language,(which is the only thing i kno).now how do i burn this program onto the microcontroller,pls help.
thanx in advance.
crazytwism
hi
iam doing a mini project on solar tracker,it uses AT89C51 now i have a program for the micro controller, the only problem is that it is in a wierd type of C(my friends told me itis embedded c) and doesnt use assembly language,(which is the only thing i kno).now how do i burn this program onto the microcontroller,pls help.
thanx in advance.
crazytwism
You run the C program through a C compiler, this converts it to assembler source code. You then use an assembler to convert the assembler source to the actual machine code file, usually ending in .HEX, then use a programmer to transfer the .HEX file to the processor.
Some C compilers include an assembler as well, and produce the .HEX file in a single operation.
Unless you have a C compiler (or access to one), you will have to rewrite the program in assembler.
hi
i got a compiler,cud u please tell me how to assemble the program using a c compiler(actually i have got a choice of compilers visual c++,borland c++ and turbo c++,i have to thank my friends for that).now i want to kno how to convert program into assembly language.pls help.
thanx in advance
crazy twism
hi
i got a compiler,cud u please tell me how to assemble the program using a c compiler(actually i have got a choice of compilers visual c++,borland c++ and turbo c++,i have to thank my friends for that).now i want to kno how to convert program into assembly language.pls help.
thanx in advance
crazy twism
You need a compiler for the AT89C51, PC compilers can only create programs for PC's - they are of no use to you.
To be correct, it should be called a 'cross compiler', it runs on a PC (or other computer system) but produces code for a completely different processor.
You can search for Keil C51.This is the C developing environment for atmel microcontrollers as well as ARMs.You can buy this software.There are copied and cracked versions too,but it's definitely illegal.
He's just trying to use a C code from somewhere else rather than writing a program from scratch.Of course assembly language is available,I've been using it since the beginning of my microcontroller interest.A compiler is what he really needs.