Home Automation, Networking, and Entertainment Lab
Dept. of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN
Chung-Ping Young
楊中平
8051 MICROCONTROLLERS
The 8051 Microcontroller and Embedded
Systems: Using Assembly and C
Mazidi, Mazidi and McKinlay
Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN
2
HANEL
OUTLINES
Microcontrollers and embedded
processors
Overview of the 8051 family
Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN
3
HANEL
MICRO-
CONTROLLERS
AND
EMBEDDED
PROCESSORS
Microcontroller
vs. General-
Purpose
Microprocessor
General-purpose microprocessors
contains
¾ No RAM
¾ No ROM
¾ No I/O ports
Microcontroller has
¾ CPU (microprocessor)
¾ RAM
¾ ROM
¾ I/O ports
¾ Timer
¾ ADC and other peripherals
Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN
4
HANEL
MICRO-
CONTROLLERS
AND
EMBEDDED
PROCESSORS
Microcontroller
vs. General-
Purpose
Microprocessor
(cont’)
Serial
COM
Port
Timer
I/O
ROM
RAM
CPU
Microcontroller
CPU
RAM
Address bus
Data bus
ROM
I/O
Port
Serial
COM
Port
Timer
General-
purpose
Micro-
Processor
Department of Computer Science and Information Engineering
National Cheng Kung University, TAIWAN
5
HANEL
MICRO-
CONTROLLERS
AND
EMBEDDED
PROCESSORS
Microcontroller
vs. General-
Purpose
Microprocessor
(cont’)
General-purpose microprocessors
¾ Must add RAM, ROM, I/O ports, and
timers externally to make them functional
¾ Make the system bulkier and much more
expensive
¾ Have the advantage of versatility on the
amount of RAM, ROM, and I/O ports
Microcontroller
¾ The fixed amount of on-chip ROM, RAM,
and number of I/O ports makes them ideal
for many applications in which cost and
space are critical
¾ In many applications, the space it takes,
the power it consumes, and the price per
unit are much more critical considerations
than the computing power
Department of Computer Science and I