UMBC |
CMSC 391 -- Programming Microcontrollers |
Previous | Next |
Microprocessors vs Microcontrollers
Microcontrollers
A microprocess is a general-purpose digital computer central processing unit.
To make a complete micorcomputer, you add memory (ROM and RAM) memory decoders,
an oscillator, and a number of I/O devices. The prime use of a microprocessor is to
read data, perform extensive calcualtions on that data, and store the results in a
mass storage device or display the results. The design of the microcontroller is driven
by the desire to make it as expandable and flexible as possible.
Microcontrollers
A microcontroller is a true computer on a chip. The design incorporates all of the
features found in a micro-processor CPU: ALU, PC, SP, and registers. It also
has ROM, RAM, parallel I/O, serial I/O, counters and a clock circuit. The
microcontroller is a general-purpose device meant to read data, perform limited
calculations on that data and control its environment based on those calcualtions.
The prime use of a microcontroller is to control the oeprations of a machine using a
fixed program that is stored in ROM and does not change over the lifetime of the
system. The miccontroller is concerned with getting data from and to its own pins;
the architecture and instruction set are optimized to handle data in bit and byte
size.
Summary
The contrast between a microcontroller and a microprocessor is best exemplified by
the fact that most microprocessors have many operation codes (opcodes) for moving
data from external memory to the CPU; microcontrollers may have one or two.
Microprecssors may have one or two types of bit-handling instructions; microcontrollers
will have many.
8051 programs are more compact and will run faster (than a microprocessor) to
accomplish the similar tasks. The disadvantage of using a lean instruction
set is increased programmer effort (expense) to
write code; this disadvantage can be overcome when writing large programs by the use
of high-level languages such as BASIC and C, both of them are popular with 8051
system developers. The price paid for reducing programmer time (and there is always
a price) is the size of the program generated (which could drive
up the unit cost of the system.)
Previous |
Next
©2004, Gary L. Burt