INSIDE THE
COMPUTER
Internal
Working of
Computers
(cont’)
Ex. (cont’)
4.
􀂾 From memory location 1402H it fetches code 04H
􀂾 After decoding, the CPU knows that it must add to
the contents of register A the byte sitting at the
next address (1403)
􀂾 After the CPU brings the value (42H), it provides
the contents of register A along with this value to
the ALU to perform the addition
􀂃 It then takes the result of the addition from the
ALU’s output and puts it in register A
􀂃 The program counter becomes 1404, the address
of the next instruction
...

INSIDE THE
COMPUTER
Internal
Working of
Computers
(cont’)
Ex. (cont’)
5.
􀂾 Address 1404H is put on the address bus and the
code is fetched into the CPU, decoded, and
executed
􀂃 This code is again adding a value to register A
􀂃 The program counter is updated to 1406H
6.
􀂾 The contents of address 1406 are fetched in and
executed
􀂾 This HALT instruction tells the CPU to stop
incrementing the program counter and asking for
the next instruction
Home Automation, Networking, and Entertainment Lab

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

MICROCONTROLLERS
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

MICROCONTROLLERS
AND
EMBEDDED
PROCESSORS
Microcontroller
vs. General-
Purpose
Microprocessor
(cont’)
Serial
COM
Port
I/O Timer
CPU RAM ROM
Microcontroller
CPU
RAM
Address bus
Data bus
ROM I/O
Port
Serial
COM
Port
Timer
Generalpurpose
Micro-
Processor

MICROCONTROLLERS
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

MICROCONTROLLERS
AND
EMBEDDED
PROCESSORS
Microcontrollers
for Embedded
Systems
􀂉 An embedded product uses a
microprocessor (or microcontroller) to
do one task and one task only
􀂾 There is only one application software that
is typically burned into ROM
􀂉 A PC, in contrast with the embedded
system, can be used for any number of
applications
􀂾 It has RAM memory and an operating
system that loads a variety of applications
into RAM and lets the CPU run them
􀂾 A PC contains or is connected to various
embedded products
􀂃 Each one peripheral has a microcontroller inside
it that performs only one task

MICROCONTROLLERS
AND
EMBEDDED
PROCESSORS
Microcontrollers
for Embedded
Systems
(cont’)
􀂉 Home
􀂾 Appliances, intercom, telephones, security systems,
garage door openers, answering machines, fax
machines, home computers, TVs, cable TV tuner,
VCR, camcorder, remote controls, video games,
cellular phones, musical instruments, sewing
machines, lighting control, paging, camera, pinball
machines, toys, exercise equipment
􀂉 Office
􀂾 Telephones, computers, security systems, fax
machines, microwave, copier, laser printer, color
printer, paging
􀂉 Auto
􀂾 Trip computer, engine control, air bag, ABS,
instrumentation, security system, transmission
control, entertainment, climate control, cellular
phone, keyless entr

Post a Comment

0 Comments

Close Menu