You are on page 1of 5

Embedded C

5/19/15

BICARD

N. P. PAWAR

Disadvantages of Assembly
Language
Difficult

to Modify it need to read


complete Instruction set &
Architecture of the Specific
Microcontroller
Code Difficult to Understand
When other person from different
Engineering Department
Difficult for Porting the Code
Advantage- It is faster than
Embedded C
5/19/15

BICARD

N. P. PAWAR

It

is works like Basic C programming but it


is used for to write the code for Embedded
Microcontroller or Processors so it is called
Embedded C.
We can used same loop, Arrays, Pointers,
Functions & Preprocessor Directives.
But little change in pin configuration & the
header files
For eg. In case of 8051 it need to add
reg51.h header file instead of the stdio.h

5/19/15

BICARD

N. P. PAWAR

Advantages of Embedded
C
Easy

to Portable
Easy to Modify
Easy to Understand the Code
Easy to used same code for other
Microcontroller
Disadvantage
Execution is slower
It Required More Memory
5/19/15

BICARD

N. P. PAWAR

Declaration in Embedded C

Example

8051 Microcontroller
For Port = sfr led=0x80
sfr=special function register
led =variable name
0x80 = Port 0 address
we can use same if,if-else,while,dowhile loops but for loop can be use like
this
for(i=0;i<100;i++);
5/19/15

BICARD

N. P. PAWAR

You might also like