0% found this document useful (0 votes)
7 views72 pages

Microprocessor Systems Overview Guide

Uploaded by

zubairaw
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views72 pages

Microprocessor Systems Overview Guide

Uploaded by

zubairaw
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd

Introduction to

Microprocessor
Systems
What we are going to learn in this
session:
 What is a microprocessor.
 History of microprocessors.
 What is a microprocessor system.
 Components inside the microprocessor system:
 Component description.
 Function.
 Arrangement.
 The CPU execution cycle.
 What is it.
 How the cycle works.
Microprocessors
Microprocessor
 A microprocessor is an electronic device
that consists of millions (or billions) of
transistors packed into one IC.
 Its function is to execute instructions in the
form of programs, calculate and store its
results.
 Microprocessors are used widely in our
everyday lives.
Everyday Items that use
Microprocessors

Wikipedia - ECU
Microprocessor
 µP is a complex, powerful device:
 Able to process huge amounts of data.
 Built using transistors etched on silicon die.
 Needs external components to support
operation.
 Microcomputer system – support µP
operations.
Microprocessors Fabrication

1. Microprocessors are
manufactured by etching
transistors into an
empty silicon wafer.

2. The etching process 3. Once proper leads


is done in a clean room and connections are
using machines. attached, the microprocessor
is ready to be used.
Microprocessor
 The microprocessor can be used to
perform complex operations by giving it
instructions.
 These instructions are called programs.
 Programs are loaded into memory, and
are executed line-by line by the
microprocessor.
History of
Computers
Microprocessor and Computers
 Since its invention in 1970s, the
microprocessor has undergone major
improvements.
 We can look at the history of
microprocessors by looking at computers
and how they have evolved over the
years.
History of Computers
 Has undergone significant improvements:
4 generations until now.
 Tied to development of electronics,
semiconductors.
History of Computers

G1 G2 G3 G4

Vacuum Transistor IC Better IC


Tube technology
History of Computers
 What’s next?
 Conventional computing:
 Advancements in semiconductor technology.
 Smaller, faster, less power.

 More cores in one processor.

 Unconventional computing:
 Quantum computer.
 Chemical computer.

 Molecular computer.
History of Computers
 First Generation (1954-56):
Vacuum Tubes as switches.
Magnetic drums as memory.
Very big, unreliable, slow.
Examples:
 ENIAC (Electronic Numerical Integrator And Computer) ,
 UNIVAC (UNIVersal Automatic Computer) .
First Generation Computers

Vacuum Tubes

Electronic Numerical Integrator and Computer (ENIAC)


History of Computers
 Second Generation (1956-63):
After invention of transistors.
Smaller, faster, cheaper.
Limited to military and business use.
Second Generation Computers
Vacuum tube circuit

Transistor circuit
History of Microprocessors
 Third Generation (1964-71):
 After invention of Integrated Circuits (IC).
 Many transistors can be packed into IC – birth of
microprocessors.
 Earlymicroprocessors: Intel 8008, Intel 4004.
 Medium Scale Integration (MSI) and Large
Scale Integration (LSI) devices.

Description of SSI,
MSI, LSI, VLSI
Early Intel Microprocessors
Third Generation Computers

PC
Laptop
History of Computers
 Fourth Generation (1971-now):
 Improvements in IC technology, µP design.
 More transistors  more processing power.
 Very Large Scale Integration (VLSI).
 Intel Montecito Itanium: 1 bln. transistors.
 Reduced Instruction Set Computers (RISC).
 32, 64-Bit microprocessors.

Description of SSI,
MSI, LSI, VLSI
Fourth Generation Computers
Comparison between Computer
Generations
Computer Speed Memory Cost

UNIVAC 1.3 kHz 1MB $1.6 million


(1st Gen.)

IBM 1401 2.2 kHz 1.4kB $47,900


(2nd Gen.)

DEC PDP-8 $20,000


1 MHz 6 kB
(3nd Gen.)

Pentium III 500 MHz 128 MB $700


(4th Gen.)
Microprocessor
Systems
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.
Microprocessor System - PC

ROM Floppy RAM

Supporting
CD-ROM CPU Circuitry

Keyboard Mouse HDD


Microprocessor System - Calculator

Memory

Power Supply CPU LCD Display

Keypad
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.


System Bus
 Communication “highway” for all
components.
 Contains:
 Data lines.
 Address lines.
 Control lines: regulate information transfer,
interrupts, error signals.
Block Diagram

Interrupt
Parallel I/O Serial I/O
Circuit

System Bus

Timing CPU Memory


The CPU CPU

 “Master” of all components.


 Job:
 Get instructions from memory.
 Execute instructions.
 Perform calculations (may use math co-
processor).
 Control bus operations.
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.
Memory 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).
RAM, ROM and NVM
ROM
Stores start-up
instructions and critical
system data and
variables.
Memory NVM

Stores general data


RAM and applications
ROM Read only Memory
NVM Non-volatile memory
RAM Random Access Memory
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.
ROM Examples

EEPROM Programmer

EPROM
Quartz Window
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.
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.
RAM vs. ROM

RAM is still empty


because the computer
has just been started.
Computer is CPU looks for
turned on instructions from
memory

CPU loads
instructions
from ROM.
RAM vs. ROM

RAM loads more


advanced functions, such
ROM only has basic as the OS.
functions to start the computer.
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.
Crystal Oscillator
Symbol

Equivalent Circuit

Sample
Clock Signal

T T T
Clock Signal vs. Processing Speed
 Instruction CLR.W D7 takes 4 cycles to
complete.

Slow clock speed

Fast clock speed time


I/O
 Input/Output.
 Connects µP with external devices:
 Add functionality to µP.
 Interfaces with µP using ports.
 Examples:
 Keyboard.
 Mouse.
 Display monitor.
How do ports connect to system
bus?

Built into board

Using card slots.


Serial I/O 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 Port
Parallel I/O Parallel I/O

 Sends/receives data across multiple lines at one


time.
 Connects using parallel ports.
 Advantages:
 Fasterthan serial.
 Simpler circuits – doesn’t need UART.

 Disadvantages:
 Crosstalk.
Parallel Port
Parallel vs. Serial I/O
1011011010101010011010101010100011101100101 Receive
1011011010101010011010101010100011101100101 Transmit

Serial Port

1011011010101010011010101010100011101100101 Receive/Transmit
1011011010101010011010101010100011101100101 Receive/Transmit
1011011010101010011010101010100011101100101 Receive/Transmit
.
.
Parallel Port
UART
1
From Device 1001 0 To System Bus
UART
0
1

1
To Device 1001 0 From System Bus
UART
0
1
Interrupt Circuit 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:
 Importanttasks given higher interrupts.
 Less important tasks queued.
 CPU keeps track of current interrupt level.
How Interrupts Work
CPU Device

1. CPU is performing 2. Device has more


tasks normally. important task that requires
immediate attention.

4. CPU saves its current task 3. Device requests interrupt from


so that it can return to it CPU.
when the interrupt completes.

5. CPU services the interrupt.

6. CPU reloads saved task,


and resumes normally.
Watchdog Monitor
 Watchdog monitor:
 Special circuit - monitors the system for errors.
 Informs the CPU.
 CPU takes appropriate actions – re-execute instruction, reset
system, halt processor.
 May work in two ways:
 Constantly monitor the system, and sends signal if error
detected.
 Continuously sending signal to CPU after certain interval:
 If CPU receives signal, continues processing.
 If CPU doesn’t receive signal, something’s wrong.
How Watchdogs Work
CPU Watchdog

1. CPU is performing 1. Watchdog monitors bus for errors.


tasks normally.

3. CPU saves its current task 2. If error detected, inform CPU.


so that it can return to it
when error is resolved.

4. CPU fixes the error.

5. CPU reloads saved task, 5. If error is too serious, CPU may reset/halt system.
and resumes normally.
CPU Execution
Cycle
CPU Execution Cycle
 CPU executes instructions in endless fetch,
decode, execute cycles.
 It only knows how to do three things:
 Fetch instructions from somewhere.
 Analyze instruction, get more data if necessary.
 Execute instruction.
 Keeps track of instruction using Program
Counter (PC):
 Tells CPU location of next instruction.
Fetch, Decode, Execute
Reset

Fetch

Decode

Execute
Fetch – Step 1
CPU Memory

$1000 Instruction #1
Control
$1001 Instruction #1
$1002 Instruction #2
Instruction Register
$1003 Instruction #2
$1004 Empty
Data Registers
$1005 Empty

CPU gets $1006 Empty

instruction $1007 Data #1

address from PC $1008 Data #2


$1009 Data #3
Program Counter

$1000
Fetch – Step 2
CPU Memory
Address Bus
$1000 Instruction #1
Control $1000 $1001 Instruction #1
$1002 Instruction #2
Instruction Register
$1003 Instruction #2
$1004 Empty
Data Registers
$1005 Empty

CPU outputs $1006 Empty

instruction address $1007 Data #1

through Address $1008 Data #2

Bus $1009 Data #3


Program Counter

$1000
Fetch – Step 3
CPU Memory
Data Bus
$1000 Instruction #1
Control Instruction #1 $1001 Instruction #1
$1002 Instruction #2
Instruction Register
$1003 Instruction #2
$1004 Empty
Data Registers
$1005 Empty

Memory gets the $1006 Empty

instruction and $1007 Data #1

sends in to CPU $1008 Data #2

using Data Bus. $1009 Data #3


Program Counter

$1000
Fetch – Step 4
CPU Memory

$1000 Instruction #1
Control
$1001 Instruction #1
$1002 Instruction #2
Instruction Register
Instruction #1 $1003 Instruction #2
$1004 Empty
Data Registers
$1005 Empty

CPU stores $1006 Empty

instruction in $1007 Data #1

Instruction Register $1008 Data #2


$1009 Data #3
Program Counter

$1000
Fetch – Step 5
CPU Memory

$1000 Instruction #1
Control
$1001 Instruction #1
$1002 Instruction #2
Instruction Register
Instruction #1 $1003 Instruction #2
$1004 Empty
Data Registers
$1005 Empty

After instruction has $1006 Empty

been loaded, CPU $1007 Data #1

updates Program $1008 Data #2

Counter. $1009 Data #3


Program Counter

$1002
Decode – Step 1
CPU Memory

$1000 Instruction #1
Control
$1001 Instruction #1
$1002 Instruction #2
Instruction Register
Instruction #1 $1003 Instruction #2
$1004 Empty
Data Registers
$1005 Empty

CPU analyzes $1006 Empty

instructions before $1007 Data #1

executing it. $1008 Data #2


$1009 Data #3
Program Counter

$1002
Type of instruction.
Does the instruction require any data to perform calculations?
Where are the data located?
Execute – Step 1
CPU Memory
Address Bus
$1000 Instruction #1
Control $1007 $1001 Instruction #1
$1002 Instruction #2
Instruction Register
Instruction #1 $1003 Instruction #2
$1004 Empty
Data Registers
$1005 Empty

If instruction $1006 Empty

requires data from $1007 Data #1

memory, data $1008 Data #2

address is placed $1009 Data #3


Program Counter

$1002 on address bus.


Execute – Step 2
CPU Memory
Data Bus
$1000 Instruction #1
Control Data #1 $1001 Instruction #1
$1002 Instruction #2
Instruction Register
Instruction #1 $1003 Instruction #2
$1004 Empty
Data Registers
$1005 Empty

Memory gets the $1006 Empty

instruction and $1007 Data #1

sends in to CPU $1008 Data #2

using Data Bus. $1009 Data #3


Program Counter

$1002
Execute – Step 3
CPU Memory

$1000 Instruction #1
Control
$1001 Instruction #1
$1002 Instruction #2
Instruction Register
Instruction #1 $1003 Instruction #2
$1004 Empty
Data Registers
$1005 Empty
Data #1
CPU puts data $1006 Empty

inside internal data $1007 Data #1

registers and $1008 Data #2

execute instructions. $1009 Data #3


Program Counter

$1002
Execute – Step 4
CPU Memory
Address Bus
$1000 Instruction #1
Control $1005 $1001 Instruction #1
$1002 Instruction #2
Instruction Register
Instruction #1 $1003 Instruction #2

Data Bus $1004 Empty


Data Registers
$1005 Empty
Data #1 Result #1
$1006 Empty
Result #1
$1007 Data #1
$1008 Data #2

If instruction wants to $1009 Data #3


Program Counter

$1002 write data to memory,


CPU puts its data and
address on the bus.
Execute – Step 5
CPU Memory

$1000 Instruction #1
Control
$1001 Instruction #1
$1002 Instruction #2
Instruction Register
Instruction #1 $1003 Instruction #2
$1004 Empty
Data Registers
$1005 Result #1
Data #1
$1006 Empty
Result #1
$1007 Data #1
Memory receives
$1008 Data #2
instructions and puts
$1009 Data #3
Program Counter data in the location.
$1002
Conclusion
Conclusion
 µP is a complex, powerful device:
 Able to process huge amounts of data.
 µP-based systems provide supporting circuitry to
support µP functions.
 Long history, advancements along with
technology.
 Executes instructions from memory in endless
loop.

You might also like