Difference Between C & Embedded C

As a beginner when you start working with controller you might be in a bit confused about the difference between C and Embedded C? Where shall I write a code for my controller? This article will bring out the differences between C & embedded C.

When you start working with embedded C then you may feel that the embedded C is quite similar to the conventional C. Then why it is been named as embedded C?
  1. The C language is used for desktop application while embedded C is used for microcontroller application.
  2. The C language uses the desktop OS memory, while embedded C uses the controllers inbuilt or any externally attached memory. In the case of controller we have very limited resources (controllers RAM, ROM, IO ports, etc.) so one must be very careful about declaring and using the variable. At any instant of time you need to be care full that you are not using the space more than the available one in the controller or else the program will get crash, or you may not get the exact result.   
  3. The embedded C needs a different platform then C. Almost every family of controllers need a different platform to write their codes. 
  4. A convention C code generates an OS compatible .exe file while embedded C code generates a .hex file which has the machine codes to be dumped in the memory of the controller. 
  5. In C we use header files like stdio.h, which yield the output to be visible on OS itself. In embedded C everything is same but the output files are directly loaded on the controllers to test them. 
  6. The C language is use to make a program for host interaction while embedded C is use to implement the host on the controller which interact with the other peripherals.

No comments:

Post a Comment