You are on page 1of 24

Introduction

Microprocessor (µP)(MPU)
A µP is a CPU on a single chip.
Components of CPU
ALU, instruction decoder, registers, bus control
circuit, etc.
Micro-computer (u-Computer)
small computer
µP + peripheral I/O + memory specifically for
data acquisition and control applications
Microcontroller (µC)
2

u-Computer on a single chip of silicon


µP vs. µC
A µP
only is a single-chip CPU
bus is available
RAM capacity, num of port is selectable
RAM is larger than ROM (usually)
A µC
contains a CPU and RAM,ROM ,Peripherals, I/O
port in a single IC
internal hardware is fixed
Communicate by port
ROM is larger than RAM (usually)
Small power consumption
Single chip, small board
Implementation is easy 3

Low cost
µP vs. µC – cont.
Applications
µCs are suitable to
control of I/O
devices in designs
requiring a minimum
component
µPs are suitable to
processing
information in
computer systems.
4
µP vs. µC – cont.
µC is easy to use and design.
Only single chip can be a complete system
interfacing to other devices,
for example, motors, displays, sensors, and
communicate with PC.
In contrast, similar system that builds
from µP would require a lot of additional
units,
such as RAM, UART, I/O , TIMER and etc.
5
µC is a Reusable Hardware
Logic circuit provides limited function for one
single design. In order to change circuit’s
functionality, we need to redesign the circuits.
µC can reprogram and change functionality of
every port, input to output or digital to analog
on the fly.

6
Microcontrollers
Many µCs are existing right now.
PIC, 8051, 68HC11, MSP430, ARM series, and etc.
We may widely divide it with how it is designed
RISC/CISC architecture.
What is the main difference between
RISC/CISC?
Does it make any difference to our application?

7
The Microprocessor (MPU)
The µP is the ‘brain of the microcomputer’
Is a single chip which is capable of
processing data
controlling all of the components which make up the
microcomputer system
µP used to sequence executions of instructions
that is in memory
µP Fetch , Decode , and Execute the instruction
The internal architecture of the microprocessor
is complex.
8
The Microprocessor (MPU)
Microprocessor (MPU) typically contains
Registers: Temporary storage locations for program
instruction or data.
The Arithmetic Logic unit (ALU): This part of the MPU
performs both arithmetic and logical operations
Timing and Control Circuits: that keep all of the other
parts of system (Regs, ALU, memory & I/O) working
together in the right time sequence

9
Microcomputers
All Microcomputers consist of (at least)
1. Microprocessor Unit (MPU)
2. Program Memory (ROM)
3. Data Memory (RAM)
4. Input / Output ports
5. Bus System
(and Software)

MPU is the brain of microcomputer 10


Microcomputers

11
The Input/Output (I/O) System
I/O is the link between the MPU and the
outside world.
An input port is a circuit through which an
external device can send signals (data?)
to the MPU.
An output port is a circuit that allows the
MPU to send signals (data?) to external
devices.
I/O ports connect both digital and
analogue devices by DAC and ADC 12
Bus
A Bus is a common communications pathway
used to carry information between the various
elements of a computer system
The term BUS refers to a group of wires or
conduction tracks on a printed circuit board
(PCB) though which binary information is
transferred from one part of the microcomputer
to another
The individual subsystems of the digital
computer are connected through an
interconnecting BUS system. 13
Bus
There are three main bus groups
ADDRESS BUS
DATA BUS
CONTROL BUS

14
Data Bus
The Data Bus carries the data which is
transferred throughout the system. ( bi-
directional)
Examples of data transfers
Program instructions being read from memory into
MPU.
Data being sent from MPU to I/O port
Data being read from I/O port going to MPU
Results from MPU sent to Memory
These are called read and write operations 15
Address Bus
An address is a binary number that
identifies a specific memory storage
location or I/O port involved in a data
transfer
The Address Bus is used to transmit the
address of the location to the memory or
the I/O port.
The Address Bus is unidirectional ( one
way ): addresses are always issued by the
16

MPU.
Control Bus
The Control Bus: is another group of
signals whose functions are to provide
synchronization ( timing control ) between
the MPU and the other system
components.
Control signals are unidirectional, and are
mainly outputs from the MPU.
Example Control signals
RD: read signal asserted to read data into MPU
WR: write signal asserted to write data from MPU 17
Main memory
The duties of the memory are :
To store programs
To provide data to the MPU on request
To accept result from the MPU for storage
Main memory Types
ROM : read only memory. Contains program
(Firmware). does not lose its contents when power
is removed (Non-volatile)
RAM: random access memory (read/write
memory) used as variable data, loses contents
when power is removed volatile. When power up
will contain random data values
18
Read-Only Memory
µP can read instructions from ROM quickly
Cannot write new data to the ROM
ROM remembers the data, even after
power cycled
Typically, when the power is turned on, the
microprocessor will start fetching
instructions from the still-remembered
program in ROM (bootstrap )
19
Available ROMs
Masked ROM or just ROM
PROM or programmable ROM(once only)
EPROM (erasable via ultraviolet light)
Flash (can be erased and re-written about 10000
times, usually must write a whole block not just 1
byte or 2 bytes, slow writing, fast reading)
EEPROM (electrically erasable read-only memory,
also known as EEROM—both reading and writing
are very slow but can program millions of
times…useless for storing a program but good for
say configuration information. 20
ROM A0 D0
A1 D1
m+1 bit A2 D2 n+1 bit
Address Data
Am 2m 1
(n 1)
Dn
m 1
Capacity : 2 ROM
PROM
EEPROM
OE : Output Enable
connect to RD of µP

CE (CS ) : Chip Enable


to Address decoder CE OE

21
Timing Diagram for a Typical ROM
A0-Am

D0-Dn

CE

OE

OE falls to data valid


Addr valid to data valid

22
RAM (Random Access
Memory)
The µP can read the data from RAM quickly
The µP can write new data quickly to RAM
RAM forgets its data if power is turned off
Two type of is available :
Static RAM(SRAM): ff base, fast, expensive, low
cap/vol, applied for cache , no refresh
Dynamic RAM (DRAM): cap base, slow , low
cost high capacity/volume , applied for main
memory(pc) need refresh.
23
RAM(Static) A0 D0
A1 D1
m+1 bit A2 D2 n+1 bit
Address Data
Am 2m 1
(n 1)
Dn
m 1
Capacity : 2 RAM Data bus is
Bidirectional
RD : Read signal
connect to MemRD of µP
WR : Write signal
connect to MemWR of µP
CS WR RD
CS : Chip Select
to Address decoder
24
SUMMARY

25

You might also like