2. Microprocessor Systems
Definition: A complete electronic system built
around the microprocessor to support the
microprocessor operation.
May consist of CPU, memory, I/O (disk drives,
keyboard, mouse), system bus, and supporting
circuitry.
CPU as the “brain” – controls actions of all
components.
5. System Bus
A µP-based system consists of many
components:
CPU.
Memory.
I/O: disk drives, keyboard, mouse.
System Bus.
Supporting circuitry.
All components communicate using System Bus.
6. System Bus
Communication “highway” for all
components.
Contains:
Data lines.
Address lines.
Control lines: regulate information transfer,
interrupts, error signals.
8. The CPU
“Master” of all components.
Job:
Get instructions from memory.
Execute instructions.
Perform calculations (may use math co-
processor).
Control bus operations.
CPU
9. The CPU
CPU consists of:
ALU (Arithmetic/Logic Unit):
Performs arithmetic/ logic computations.
CU (Control Unit):
Responsible to retrieve instructions, analyze, then
execute.
Registers:
Fast internal storage.
Used to temporarily store addresses, data,
processor status.
10. Memory
Stores instructions and data for CPU.
Each memory location given unique
address.
CPU refers to address to access.
Types:
Read-Only Memory (ROM).
Random-Access Memory (RAM).
Non-Volatile Memory (NVM).
Memory
11. RAM, ROM and NVM
Memory NVM
RAM
ROM
Stores start-up
instructions and critical
system data and
variables.
Stores general data
and applications
12. ROM
Read-Only Memory:
Data can be read, but cannot be written (read-only).
Contents stay without power (non-volatile).
Usually contains basic start-up instructions, data.
Contents hard-wired during manufacturing.
Newer versions can be reprogrammed:
PROM: Fuse & anti-fuse.
EPROM: UV light.
EEPROM: Electrical current.
14. NVM
Non-Volatile Memory
Contents can be read and written.
Contents stay without power (non-volatile).
Advantages:
Keeps memory even with no power.
Data is protected against blackouts.
Rewriteable.
Disadvantages:
Slower than RAM.
15. RAM
Random Access Memory.
Contents can be read and written.
Loses data without electrical power (volatile).
Advantages:
Programs can be loaded and reloaded.
Larger capacity.
Disadvantages:
Requires power, refresh cycles.
16. RAM vs. ROM
Computer is
turned on
CPU looks for
instructions from
memory
RAM is still empty
because the computer
has just been started.
CPU loads
instructions
from ROM.
17. RAM vs. ROM
ROM only has basic
functions to start the computer.
RAM loads more
advanced functions, such
as the OS.
18. Timing Circuit Timing
Synchronizes all components in the system.
All components refer to the clock timing for
operations.
Generates square waves at constant intervals.
Crystal oscillator + timing circuitry.
Higher clock speed allow computers to function
faster.
21. Clock Signal vs. Processing Speed
Instruction CLR.W D7 takes 4 cycles to
complete.
time
Slow clock speed
Fast clock speed
22. I/O
Input/Output.
Connects µP with external devices:
Add functionality to µP.
Interfaces with µP using ports.
Examples:
Keyboard.
Mouse.
Display monitor.
23. How do ports connect to system
bus?
Built into board
Using card slots.
24. Serial I/O
Sends/receives data sequentially across 2 channels.
One for receive, one for transmit.
Connects using serial ports.
Advantages:
Less crosstalk.
Disadvantages:
Slow.
Needs special circuit to convert back to parallel (UART –
Universal Asynchronous Receiver/Transmitter).
Serial I/O
28. Parallel vs. Serial I/O
1011011010101010011010101010100011101100101
1011011010101010011010101010100011101100101
1011011010101010011010101010100011101100101
1011011010101010011010101010100011101100101
Serial Port
Parallel Port
1011011010101010011010101010100011101100101 Receive
Transmit
.
.
Receive/Transmit
Receive/Transmit
Receive/Transmit
30. Interrupt Circuit
Allows other components to “interrupt” normal
CPU operation:
Prioritize CPU tasks.
Error detection mechanism.
Accept inputs from devices – keystroke, mouse press.
Depends on task importance:
Important tasks given higher interrupts.
Less important tasks queued.
CPU keeps track of current interrupt level.
Interrupt
Circuit
31. How Interrupts Work
CPU Device
1. CPU is performing
tasks normally.
2. Device has more
important task that requires
immediate attention.
3. Device requests interrupt from
CPU.
4. CPU saves its current task
so that it can return to it
when the interrupt completes.
5. CPU services the interrupt.
6. CPU reloads saved task,
and resumes normally.