[SOLVED] programming microcontrollers with embedded c

Status
Not open for further replies.

rajupj

Newbie level 5
Joined
Jan 7, 2013
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,333
hi!
an anybody explain me that how embedded c language is converted to assembly language as microcontrollers understand only assembly language
 

Microcontrollers don't understand assembly. They understand binary - 0s and 1s.

The assembly language code is converted to a HEX file by the assembler. The C language code is converted to a HEX file by the compiler. According to the HEX file, the programmer programs the microcontroller to save in its program memory data in binary - in 0s and 1s.

Hope this helps.
Tahmid.
 

thank u............!!!
then what is used to convert c language to hex file?????
that is what type of interpreter is used to convert.
 
Last edited:

There are different compilers available for that, depending on the target microcontroller.

For example, for PIC, you have mikroC, CCS C, Hi-Tech C, BoostC, C18, etc
For example, for AVR, you have mikroC, AVR-GCC, CodeVision, IAR, etc

Hope this helps.
Tahmid.
 

Tahmid, may I ask.... What compiler do you prefer to use for the C language when working with PIC microcontrollers?
I have been using Hi-Tech C and have found it to be quite handy, but sometimes I wonder if maybe there are more libraries/resources available for other compilers, particularly CCS and mikroC.

Many thanks!
 

I prefer mikroC. However since you're using Hi-Tech C and find it handy, stick with it. You can get additional library routines/functions from the internet and can always write them yourself. For example, check here: https://www.microchipc.com/sourcecode/

Hope this helps.
Tahmid.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…