You are on page 1of 36

Introduction to Microprocessor

Books
Microprocessor Architecture, Programming,
and Applications with 8085 by Ramesh
Gaonkar, 6e
Advanced Microprocessors and Peripherals by
KM Bhurchandi and AK Ray
Microprocessor and Interfacing by DV Hall,
TMH,2e

Microprocessor
The key element of all computers, providing the
mathematical and decision making ability.
The Microprocessor is the brain of the
microcomputer
A microcomputer is a computer that uses a
microprocessor as its CPU. The system formed by
interfacing the microprocessor with memory and I/O
devices to execute required program.

A microprocessor is a multipurpose,
programmable, clock driven, register and ALU
based electronic device.
It reads binary instructions from a storage
device, called memory. Accepts binary data as
input, process them as per instruction and
provides result as output.

Microprocessors are typically used in either reprogrammable


or embedded systems.
Reprogrammable systems are those that have a general
purpose microprocessor capacity of handling large data,
mass storage devices, and peripherals. A PC is an example.
Embedded systems are those used to control specialized
hardware in which the computer system is installed - for
example, the microprocessor system used to control the
fuel/air mixture in the carburetor of many automobiles.
In embedded systems the software system is completely
encapsulated by the hardware that it controls.

Block diagram of microprocessor

Microprocessor unit (MPU) typically contains:


Registers: Temporary storage locations for
programming 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 (Registers , ALU, memory &
I/O) working together in the right time sequence.

The instruction set for microprocessors is in


two forms
Mnemonics
Binary machine code
Programs written using mnemonics are called
assembly language and then converted to binary
machine level language.
The conversion is done by assembler.

Block diagram of microcomputer

Microcontroller
Integrated electronic computing device that
includes three major components on a single chip
Microprocessor (MPU)
Memory
I/O (Input/Output) ports

-Also called as a single chip microcomputer.

Block diagram of Microcontroller

Microprocessor Vs. Microcontroller

Some Popular Microcontrollers

8051
Microchip Technology PIC
Atmel AVR
Texas Instruments MSP430 (16-bit)

Organization of a microprocessor
based system
ALU

Register Section

Address bus

Data bus
Control and timing section

Control bus

Arithmetic & Logic Unit (ALU)


Also known as the Integer Unit
It performs whole-number math calculations
(subtract, multiply, divide, etc) comparisons (is
greater than, is smaller than, etc.) and logical
operations (NOT, OR, AND, etc)

Control Unit
The circuitry that controls the flow of
information through the processor, and
coordinates the activities of the other units
within it.
the control unit performs the tasks of fetching,
decoding, managing execution and then
storing results.

Register set
Store intermediate and final results from their
calculations in ALU.
The number of registers are different for any
particular CPU and the more register a CPU
have will result in easier programming tasks.
Registers are normally measured by the
number of bits they can hold, for example, an
8-bit register or a 32-bit register.

Buses
The buses are group of lines that carries data, address or
control signals.
Address bus: The address bus is unidirectional, over which
the microprocessor sends an address code to the memory or
input/output.
The size (width) of the address bus is specified by the number
of bits it can handle.
The more bits there are in the address bus, the more memory
locations a microprocessor can access. A 16 bit address bus is
capable of addressing 65,536 (64K) addresses.

Data bus:
The data bus is 'bi-directional'
data or instruction codes from memory or input/output
are transferred into the microprocessor
the result of an operation or computation is sent out from
the microprocessor to the memory or input/output.
Depending on the particular microprocessor, the data bus
can handle 8 bit or 16 bit data.

Control bus
The control bus is used by the microprocessor to
send out or receive timing and control signals in
order to coordinate and regulate its operation and
to communicate with other devices, i.e. memory
or input/output.

Characteristics of a Microprocessor
The characteristics used to describe
microprocessors are:
Clock speed
Instruction set
--Cache
Bus speed
By adding more functional units (e.g. ALUs, FPUs,
Vector/SIMD units, etc.)

Clock speed
Also called clock rate, the clock speed is
the speed at which a microprocessor
executes instructions.
Every computer contains an internal clock
that regulates the rate at which
instructions are executed and
synchronizes all the various computer
components.

The faster the clock, the more instructions the


microprocessor can execute per second.
The microprocessor requires a fixed number
of clock cycles to execute each instruction.
Clock speed is stated in either MHz or GHz. 1
MHz is equal to 1 million cycles per second,
while 1 GHz is equal to 1 billion cycles per
second.

Clock speed is a major factor in determining


the power of a computer.
At the present time the most common
microprocessors run from 1.8 GHz (1.8 billion
cycles per second) to 3.2 GHz (3.2 billion
cycles per second.

Instruction Set
The possible operations a microprocessor
can performs is based on its instruction set.
Programs are written for a microprocessor
based on its instruction set.
For example, the SIMP computer
understands 10 instructions, and any
program written for it uses those ten
instructions in various ways to accomplish
complicated tasks.

Bigger instruction-sets mean more complex


chips (higher costs, reduced efficiency), but
shorter programs
Advanced processors can have from 150
to over 200 instructions, allowing for
extremely complicated tasks.

Since software is written with the


instruction set in mind, sometimes a larger
instruction set will equal better
performance.
For example, one difference between
Pentium 4 and Pentium 5 is that Pentium 5
has a larger instruction set.

Cache
The program first checks the cache to see
if the desired information is already
present there. If it is, the cache sends the
information back to the microprocessor,
bypassing the main memory.
By having a more effective caching algorithm
and the right cache size performance can be
improved.

The small size and proximity to the


microprocessor makes access times short,
resulting in a boost in performance
The microprocessors predict what data will be
required for future calculations and pre-fetches
that data and places it in the cache so that it is
available immediately when the need arises
The speed-advantage of cache memory is greatly
dependent on the algorithm used for deciding
about what to put in cache or not

Bus speed
The processor communicates with other
devices via the data bus, sometimes
called the front side bus.
Bus speed is measured in MHz, the same
unit used to measure clock speed.
While a processor might be working at up
to 3 GHz, quite often the performance of
the computer is hampered by a slower
data bus speed.

At the present time data bus speeds range from


200 MHz up to 1GHz.
In practice, the bus clock speed is often slower
than the CPU clock speed, which creates a
bottleneck. This is why local buses have been
developed.

Memory
The memory in a computer system stores the data and
instructions of the programs.
Main memory types:
ROM (read-only memory): programmed permanently at the
factory, cannot be altered.
RAM (random-access memory): read and write memory.
EPROM (erasable programmable ROM): non-volatile, written
electrically but erased optically
EEPROM (electrically ROM): non-volatile, both written
and erased electrically

History of microprocessor
Intel's 4004 is considered the first
microprocesor
The 4004 was later followed in 1972 by the
8008, the world's first 8-bit microprocessor
Then is the 8080 microprocessor evolved in
1974. This microprocessor was used on the
world's firs personal computer, named Altair
Then comes 8085 that is the 8 bit
microprocessor

You might also like