how to write program in C language

Status
Not open for further replies.

mrarslanahmed

Full Member level 2
Joined
Nov 15, 2011
Messages
143
Helped
6
Reputation
12
Reaction score
6
Trophy points
1,298
Location
gujranwala pakistan
Activity points
2,205
hy i am new 8051 world i write program in assembly and at time i get struck with some algorithmic issue which is not resolved in assembly but equivalent code in c is very easy

i am working on keil uvision2


i dont know which library to add so that my c based code is read as machine language

please help me


regards
 

Almost all executable programs are written in higher-level languages, and translated to executable machine code by a compiler and linker.
The microcontroller does not understand high-level programming languages(C language in your case) as this and therefore it is necessary to compile the program into machine language. A single click on the appropriate icon within the compiler IDE results in creating a new document with the .hex extension. It is actually the same program, just compiled into machine language which the microcontroller understands perfectly. This program is called a HEX code and forms a seemingly meaningless sequence of hexadecimal numbers. When compiled, the program should be loaded into the microcontroller by means of appropriate hardware, i.e. programmer.

---------- Post added at 02:04 ---------- Previous post was at 01:57 ----------

Keil Quick Start Tutorial **broken link removed**
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…