Difference between C language and Embedded C.First of all, the brief introduction and history of language C and Embedded C. We always use c language on processor which has operating system install on it. Its mean c language is designed to run systems which has high memory. But embedded is particularly designed to run on microcontroller based application. So we can get an idea that c language execute on system which have high resources unlike embedded c which runs on microcontrollers which has limited resources like RAM, ROM and program memory. When we compile c program it is operating system dependent file which compiler generate but embedded c code execute on microcontrollers only. PIC16F877A is major microcontroller of microchip.
C Language introduction and history
C is basically a general purpose, vital important high level programming language that is best for firmware developing and the application used for portable purposes. It supports to improve the quality of computer programming and for solving the problems in a small amount of time. It is procedural language and was designed for complied using very useful compiler to feed a very low level memory. Using complier c language is converted into machine level language. It is useful for many applications, such as application in which is code writing is so much difficult by using c that code can be easily develop. The C language used the following keywords like, for, if/else, while, switch and do/while and large number of arithmetic and logic operators such +, +=, and ++. It was developed by Dennis Ritchie in between 1969 and 1973 at bell labs for operating system Unix.
Embedded C introduction and history
Embedded c is actually the extension of c language. It consists of c language sets that can be used for different purposes. It was extending by the standard committee c in 2008 for solving the issues provide by c language. It mostly used the syntax and standard c semantics. This language has so many features as compared to c language such as it used the fixed point arithmetic, spaces between maned address and hardware input, output addressing. As we look around ourselves, we have so many embedded systems such as washing machine, digital camera and mobile phones all these the examples of embedded system, in all these things embedded c language is used. So many extra characteristics have added in embedded c such as operation or mapping register, number of memory area and representation of fixed point.
Major Difference Between C language and Embedded C
C language features
- C is a very high level language.
- It has free program coding format.
- For functioning operating system is necessary.
- It is used for desktop computer applications.
- It does not care about resources of memory because the whole memory is available in CPU.
- The C language program runs in console but output of this program can be see through desktop LCD etc.
- During running application it also supports the various types of other programming languages by indirectly or directly.
- when the program is running the input can be given to the program.
- Software system programs and logical programs are some examples of c language.
Advantages of c
- The C language is actually a building block on many different type of current languages and it have a powerful operator and verity of data type.
- It has a portable program mean if program is written is in any computer this program can be easily to another compute without any change.
- This language has variety of functions that can be used for development of programs.
- It has flexibility mean its programs can be easily extending.
- In this language programs making, debugging and testing is so much easy.
Disadvantages of C
- The C language does not have object oriented programming(OOP) therefore C++ have developed.
- We can’t check the run time in c language.
- It does not have strict type checking for example we can easily pass the integer value.
- In c language there is no any namespace concept.
- It does not have any constructor of destructor concept.
Features of Embedded C
- It is only the extension of C language and mothing more.
- It has source code format that depends upon the kind of microcontroller or microprocessor that have been being used.
- Through embedded c high level optimization can done.
- It is used in microprocessor or microcontroller applications.
- It has limited resources for used, mean the embedded system have only memory location.
- In embedded c constraints runs on real time and output is not available at operating system.
- It only supports the adequate processor or controller.
- In embedded c only pre-define program can run.
- It requires a compiler of embedded c, which have the compatibility with all the embedded system resources.
- Some of the examples of embedded system c application are digital camera, DVD and digital TV etc.
- The major advantage of embedded c is its coding speed and size is very simple and easy to understand.
Advantages of embedded c
- it is easier to understand.
- It performs the same task all the time so there is no need of any hardware changing such as extra memory or space for storage.
- It preforms only one task at one time mean it purposed the dedicated task
- Hardware cost of embedded c systems are usually so much low.
- Embedded applications are very suitable for industrial purposes.
Disadvantages of embedded c
- It performs only one task at same time so many can’t perform the multi task at same time.
- If we change the program then must be need to change the hardware.
- It only supports the hardware system.
- It also have issue of scalability mean it can’t easily have scaled up as scope change or demand.
- It have a limitation such as limited memory or computer compatibility.
So if we only talk about programming then the programming of language c and embedded c is almost same only lies the difference between these two is the resources how we use it and some kind of code effectively.