Vous êtes sur la page 1sur 4

Microprocessor Micro Controller

Microprocessor is heart of Micro Controller is a heart of


Computer system. embedded system.
It is just a processor.
Micro controller has external
Memory and I/O components
processor along with internal
have to be connected
memory and i/O components
externally
Since memory and I/O has to Since memory and I/O are
be connected externally, the present internally, the circuit
circuit becomes large. is small.
Cannot be used in compact Can be used in compact
systems and hence systems and hence it is an
inefficient efficient technique
Cost of the entire system Cost of the entire system is
increases low
Due to external components, Since external components
the entire power are low, total power
consumption is high. Hence consumption is less and can
it is not suitable to used with be used with devices running
devices running on stored on stored power like
power like batteries. batteries.
Most of the microprocessors Most of the micro controllers
have power saving modes
like idle mode and power
do not have power saving
saving mode. This helps to
features.
reduce power consumption
even further.
Since memory and I/O
components are all external,
Since components are
each instruction will need
internal, most of the
external operation, hence it is
relatively slower.

Microprocessor have less Micro controller have more


number of registers, hence number of registers, hence
more operations are memory the programs are easier to
based. write.
Microprocessors are based
Micro controllers are based
on von Neumann
on Harvard architecture
model/architecture where
where program memory and
program and data are stored
Data memory are separate
in same memory module
Mainly used in personal Used mainly in washing
computers machine, MP3 players

DIFFERENCE BETWEEN C AND EMBEDDED C

Though C and embedded C appear different and are used in different contexts, they have

more similarities than the differences. Most of the constructs are same; the difference

lies in their applications.


1. C is used for desktop computers, while embedded C is for microcontroller based

applications.

2. Accordingly, C has the luxury to use resources of a desktop PC like memory, OS, etc.

While programming on desktop systems, we need not bother about memory. However,

embedded C has to use with the limited resources (RAM, ROM, I/Os) on an embedded

processor. Thus, program code must fit into the available program memory. If code

exceeds the limit, the system is likely to crash.

3. Compilers for C (ANSI C) typically generate OS dependant executables. Embedded C

requires compilers to create files to be downloaded to the

microcontrollers/microprocessors where it needs to run. Embedded compilers give

access to all resources which is not provided in compilers for desktop computer

applications.

4. Embedded systems often have the real-time constraints, which is usually not there with

desktop computer applications.

5. Embedded systems often do not have a console, which is available in case of desktop

applications.

6. Embedded C includes extra features over C, such as fixed point types, multiple memory

areas, and I/O register mapping.

So, what basically is different while programming with embedded C is the mindset; for
embedded applications, we need to optimally use the resources, make the program code

efficient, and satisfy real time constraints, if any. All this is done using the basic

constructs, syntaxes, and function libraries of C.

Vous aimerez peut-être aussi