You are on page 1of 18

Biomedical Engineering

B.E III Year


Embedded Systems

Unit-TWO
Microcontroller And Programming
Lesson - 1
Microcontroller Verses General-Purpose
Microprocessor
• What is the difference between a Microprocessor and
Microcontroller?
• By microprocessor is meant the general purpose
microprocessor, such as intel x86 or motorola 680x0 family or
8085.
• These microprocessor contains no RAM, no ROM, and no
input/output ports on the chip itself.
• For this reason, they are commonly referred to as general
purpose microprocessor.
• “A system designer using a general purpose microprocessor
must add RAM, ROM, I/O ports and timers externally to make
them functional”.
Cont.

• Although the addition of external RAM, ROM, and I/O ports


makes these systems bulkier and much more expensive, they
have the advantage of versatility such that the designer can
decide on the amount of RAM, ROM, and I/O ports needed to
fit the task at hand.
• This is not the case with microcontroller.
• A microcontroller has a CPU (a microprocessor) in addition to
a fixed amount of RAM, ROM, I/O ports and a timer all on a
single chip.
• The processor, RAM, ROM, I/O ports, timer are all embedded
together on one chip, therefore the designer cannot add any
external memory, I/O or timer to it.
Cont.

• The fixed amount of on-chip RAM, ROM, and I/O ports in


microcontroller makes them ideal for many applications in
which cost and space are critical.
Microprocessor System Contrasted with
Microcontroller System
• General-purpose microprocessor system:
Cont.

• Microcontroller:
Key Differences:

• Microprocessor consists of only a Central Processing Unit,


whereas a microcontroller contains a CPU, memory, I/O all
integrated into a one-chip.
• Microprocessor is used in personal computers whereas
microcontroller is used in an embedded system.
• Microprocessor uses an external bus to interface to RAM,
ROM and other peripherals, on the other hand, microcontroller
uses an internal controlling bus.
• Microprocessor is complicated and expensive with a large
number of instructions to process but microcontroller is
inexpensive and straight forward with fewer instructions to
process.
Microprocessor Microcontroller
•Microprocessor is the heart of Microcontroller is the heart of an
Microprocessor vs.embedded
computer system. Microcontroller
system.
•It is only a processor, so memory It has a processor along with
and I/O components need to be internal memory and I/O
connected externally. components.
•Memory and I/O has to be Memory and I/O are already
connected externally, so the present, and the internal circuit is
circuit becomes large. small.
•It cant be used in compact system It can be used in compact system
•Cost of the entire system is high Cost of the entire system is low
•Due to external components, the As external components are low,
total power consumption is high total power consumption is less
•Most of the microprocessor do Most of the microcontroller offers
not have power saving features power saving mode
Microprocessor Microcontroller
•It is mainly used in personal It is used mainly in washing machine,
computers MP3 players, and embedded systems

•It has smaller number of registers, so It has more register, hence the
more operations are memory based. programs are easier to write

•Microprocessor is based on Von- Microcontroller is based on Harvard


neumann model architecture
•It is a central processing unit on a It is a byproduct of the development
single silicon-based integrated chip of microprocessor with a CPU along
with other peripherals

•Microprocessor based system can run Microcontroller based systems run up


at a very high speed to 200 MHz or more depending on the
architecture
•It is used for general purpose It is used for application specific
applications systems
•It is complex and expensive, with a It is simple and inexpensive with less
large no. of instructions to process no. of instructions to process.
Applications of Microprocessor:

• Calculators
• Games machine
• Complex Industrial Controllers
• Traffic light
• Control data
• Military applications
• Defense systems
• Computation systems
Applications of Microcontroller:

• Mobile phones
• Automobiles
• DVD/CD players
• Washing machine
• Cameras
• Security alarms
• Keyboard controllers
• Microwave oven
• Watches
• Mp3 players
Choosing a Microcontroller:

• There are four major 8-bit microcontroller:


1. Free scale's 6811
2. Zilog’s Z8
3. Intel’s 8051
4. PIC 16x (microchip technology)
• Each of these microcontroller has a unique instruction set and
register set, therefore they are not compatible with each other.
• Programs written for one will not run on the others.
• There are also 16-bit and 32-bit microcontroller made by
various chip makers.
Cont.

• With all the different microcontrollers, the criterion or the


designers consider in choosing the microcontroller are:
• Three criteria in choosing microcontroller’s are as under:
1. Meeting the computing needs of the task at hand efficiently
and cost effectively.
2. Availability of software development tools such as compilers,
assemblers, and debuggers.
3. Wide availability and reliable sources of microcontroller.
Criteria for choosing a Microcontroller:
1. The first and foremost criterion in choosing a microcontroller
is that it must meet the task at hand efficiently and cost
effectively.
In analyzing the needs of a microcontroller based project, one
must first see whether an 8-bit, 16-bit, 32-bit microcontroller
can best handle the computing needs of the task most
effectively.
The other considerations in this category are:
• Speed:
• Packaging: 40 pin DIP or QFP
• Amount of RAM & ROM on chip
• No. of I/O pins and the timer on the chip
• How easy it is to upgrade to higher performance versions.
Cont.

• Cost per unit: In terms of final cost of the product


2. The second criteria in choosing a microcontroller is how easy
it is to develop products around it.
3. The third criteria in choosing a microcontroller is its ready
availability in needed quantities both now and in future. For
some designers this is even more important than the first two
criteria.
Brief History of 8051 Microcontroller:
• In 1981, intel corporation introduced an 8-bit microcontroller
called 8051.
• The microcontroller had 128 bytes of RAM, 4Kbytes of on-
chip ROM, 2 timers, one serial port and 4 ports (each 8-bit
wide) all on a single chip. “System on Chip”
• 8051 is an 8-bit processor, meaning that the CPU can work on
only 8-bits of data at a time.
• Data larger than 8-bit has to be broken into 8-bit pieces to be
processed by the CPU.
• The 8051 has a total of 4 I/O ports, each 8-bits wide.
• There are two other members of 8051 family of
microcontroller: 8052 & 8031.
Comparison of 8051 Family Members

Feature 8051 8052 8031


• ROM 4K 8K 0K
• RAM (Bytes) 128 256 128

• Timers 2 3 2
• I/O Pins 32 32 32
• Serial Port 1 1 1
• Interrupt 6 8 6
Sources
Thank You

Learning Outcomes of today's lesson:


• Microcontroller verses General purpose Microprocessor.
• Key differences
• Application of Microprocessor
• Application of Microcontroller
• Criteria for choosing a Microcontroller
• History of 8051 Microcontroller
• Comparison of 8051 Family Members.

You might also like