0% found this document useful (0 votes)
23 views

Microprocessor CH 01

The document discusses microprocessors, microcontrollers, and microcomputers. It provides details on: 1) A microprocessor is an integrated circuit that functions as the central processing unit (CPU) of a computer by performing arithmetic and logic operations. It accepts binary instructions from memory and processes data. 2) Microcontrollers are similar to microprocessors but also contain memory and input/output interfaces on a single chip to perform embedded system tasks. They are commonly used in appliances and devices. 3) A microcomputer is a complete small-scale computer based on a microprocessor as the central processing unit. It has the basic components of a computer integrated into a single system.

Uploaded by

hari kc
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Microprocessor CH 01

The document discusses microprocessors, microcontrollers, and microcomputers. It provides details on: 1) A microprocessor is an integrated circuit that functions as the central processing unit (CPU) of a computer by performing arithmetic and logic operations. It accepts binary instructions from memory and processes data. 2) Microcontrollers are similar to microprocessors but also contain memory and input/output interfaces on a single chip to perform embedded system tasks. They are commonly used in appliances and devices. 3) A microcomputer is a complete small-scale computer based on a microprocessor as the central processing unit. It has the basic components of a computer integrated into a single system.

Uploaded by

hari kc
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 56

Microprocessors

- Hari K.C.
Chapter 01 : Introduction to microprocessor
Microprocessor:
• A Microprocessor is a multipurpose programmable, clock driven, register
based electronic device that reads binary instructions from a storage
device called memory, accepts binary data as input, processes data
according to those instructions and provide result s as output.
• The microprocessor operates in binary 0 and 1 known as bits are
represented in terms of electrical voltages in the machine
• That means 0 represents low voltage level and 1 represents high voltage
level.
• Each microprocessor recognizes and processes a group of bits called the
word and microprocessors are classified according to their word length .
• 8 bits microprocessor with 8 bit word and 32 bit microprocessor with 32 bit
word etc.
• The processor on a single chip is called a Microprocessor which can process
micro-instructions. Instructions in the form of 0sand 1s are called micro-
instructions.
• The microprocessor is the CPU part of a microcomputer, and it is also available as
a single integrated circuit.
• Thus as main components, the microprocessor will have theControl Unit (CU) and
the Arithmetic Logic Unit (ALU) of a microcomputer. An example is Intel 8085
microprocessor. In addition to the microprocessor features, a microcomputer will
have the following additional features:

• ROM/PROM/EPROM/EEPROM for storing program

• RAM for storing data, intermediate results, and final results

• I/O devices for communication with the outside world

• I/O ports for communication with the I/O devices.


Types of Microprocessor

• Important types of Microprocessors are:

• Complex Instruction Set Microprocessors


• The Application Specific Integrated Circuit
• Reduced Instruction Set Microprocessors
• Digital Signal Multiprocessors (DSPs)
Microcontroller

• A Microcontroller is a small and low-cost microcomputer, which is


designed to perform the specific tasks of embedded systems like
displaying microwave information, receiving remote signals etc.

• The general microcontroller consists of the processor, the memory


(RAM, ROM, EPROM), Serial ports, peripherals (timers, counters) etc.
Types of Microcontrollers
• Microcontrollers are divided into various categories based on memory, architecture, bits and
instruction sets. Following is the list of their types −

• Bit – Based on bit configuration, the microcontroller is further divided into three categories.

• 8-bit microcontroller − This type of the microcontroller is used to execute arithmetic and
logical operations like addition, subtraction, multiplication division, etc. For example, Intel
8031 and 8051 are an 8-bit microcontroller.

• 16-bit microcontrollers − This type of the microcontroller is used to perform arithmetic and
logical operations where higher accuracy and performance is required. Forexample, Intel
8096 is a 16-bit microcontroller.

• 32-bit microcontrollers − This type of the microcontroller is generally used in automatically


controlled appliances like automatic operational machines, medical appliances, etc.
• Memory − Based on the memory configuration, the microcontroller is
further divided into two categories.

• External memory microcontroller − This type of microcontroller is


designed in such a way that they do not have a program memory on
the chip. Hence, it is named as external memory microcontroller. For
example Intel 8031 microcontroller.

• Embedded memory microcontroller − This type of microcontroller is


designed in such a way that the microcontroller has all programs and
data memory, counters and timers, interrupts, I/O ports are
embedded on the chip. For example Intel 8051 microcontroller.
Applications of Microcontrollers

• Microcontrollers are widely used in various different devices such as –

• Light sensing and controlling devices like LED.

• Temperature sensing and controlling devices like a microwave oven, chimneys.

• Fire detection and safety devices like the Fire alarm.

• Measuring devices like Volt Meter.


• Microprocessor consists of only a Central Processing Unit, whereas
Micro Controller contains a CPU, Memory, I/O all integrated into one
chip.
• Microprocessor is used in Personal Computers whereas Micro Controller
is used in an embedded system.
• Microprocessor uses an external bus to interface to RAM, ROM, and
other peripherals, on the other hand, Microcontroller uses an internal
controlling bus.
• Microprocessors are based on Von Neumann model Micro controllers
are based on Harvard architecture
• Microprocessor is complicated and expensive, with a large number of
instructions to process but Microcontroller is inexpensive and
straightforward with fewer instructions to process.
Microcomputer
• A microcomputer can be defined as a small sized, inexpensive, and limited
capability computer.
• It has the same architectural block structure that is present on a computer.
Present-day microcomputers are having smaller sizes.
• Nowadays, they are of the size of a notebook. But in the coming days also
their sizes will get more reduced as well. Due to their lower costs, individuals
can possess them as their personal computers. Because of mass production,
they are becoming still cheaper. Initially, in the earlier days, they were not
very much powerful.
• Their internal operations and instructions were very much limited and
restricted. But at present days, microcomputers have not only multiplied and
divide instructions on unsigned and signed numbers but are also capable of
performing floating point arithmetic operations.
• In fact, they are becoming more powerful than the minicomputers and main
computers of yesteryear.
• So a microcomputer is a small, relatively inexpensive computer with a
microprocessor as its central processing unit (CPU).
• It includes a single printed circuit board containing a microprocessor,
memory, and minimal input/output(I/O) circuitry mounted.
• With the advent of increasingly powerful microprocessors,
microcomputers became popular in the 1970s and1980s.
• CPU: - Central processing unit which consists of ALU and
control unit.

• Microprocessor: - Single chip containing all units of CPU.

• Microcomputer: - Computer having microprocessor as CPU.

• Microcontroller: single chip consisting of MPU, memory, I/O


and interfacing circuits.

• MPU: - Micro processing unit : complete processing unit with


the necessary control signals.
Block Diagram of Computer
• Traditionally, the computer is represented with four components
• such as memory, input, output and central processing unit (CPU)
• which consists of arithmetic logic unit (ALU) and control unit (CU).
• The CPU contains various registers to store data, the ALU to perform
arithmetic and logical operations, instruction decoders, counters and
control lines.
• The CPU reads instructions from memory and performs the tasks
specified. It communicates with input/output (I/O) devices either to
accept or to send data, the I/O devices is known as peripherals.
• Later on around late 1960’s, traditional block diagram can be replaced
with computer having microprocessor as CPU which is known as
microcomputer. Here CPU was designed using integrated circuit
technology (IC) which provided the possibility to build the CPU on a
single chip.
• Later on, semiconductor fabrication technology became more
advanced.
• manufacturers were able to place not only MPU but also memory and
I/O interfacing circuits on a single chip known as microcontroller, which
also includes additional devices such as A/D converter, serial I/O, timer
etc.
Organization of a microprocessor based system
• Microprocessor based system includes there components
microprocessor, input/output and memory (read only and
read/write).
• These components are organized around a common communication
path called a bus.
• Microprocessor:
It is clock driven semiconductor device consisting of electronic logic circuits manufactured
by using either a large scale integration (LSI) or very large scale integration (VLSI)
technique.
It is capable of performing various computing functions and making decisions to change
the sequence of program execution. It can be divided in to three segments.
A. Arithmetic/Logic unit: It performs arithmetic operations as addition and subtraction and
logic operations as AND, OR & XOR.
B. Register Array: The registers are primarily used to store data temporarily during the
execution of a program and are accessible to the user through instruction.
The registers can be identified by letters such as B, C, D, E, H and L.
C. Control Unit: It provides the necessary timing and control signals to all the operations in
the microcomputer.
It controls the flow of data between the microprocessor and memory & peripherals.
• Memory:
Memory stores binary information such as instructions and data, and
provides that information to the up whenever necessary.
To execute programs, the microprocessor reads instructions and data
from memory and performs the computing operations in its ALU.
Results are either transferred to the output section for display or
stored in memory for later use.
Memory has two sections.
• Read only Memory (ROM): Used to store programs that do not need
alterations and can only read.
• Read/Write Memory (RAM): Also known as user memory which is
used to store user programs and data. The information stored in this
memory can be easily read and altered.
Harvard Architecture
• In von-Neumann architecture, the same memory is used for storing
instructions and data.
• Similarly, a single bus called data bus or address bus is used for
reading data and instructions from or writing to memory.
• It also had limited the processing speed for computers.
• The Harvard architecture based computer consists of separate
memory spaces for the programs (instructions) and data.
• Each space has its own address and data buses.
• So, instructions and data can be fetched from memory concurrently
and provides significance processing speed improvement.
• In figure below, there are two data and two address buses
multiplexed for data bus and address bus.
• Hence, there are two blocks of RAM chips one for program memory
and another for data memory addresses.
• The control unit controls the sequence of operations.
• Central ALU consists of ALU, multiplier, accumulator and register.
• The PC used to address program memory and always contains the
address of next instruction to be executed.
• Here data and control buses are bidirectional and address bus is
unidirectional.
Evolution of Microprocessors (Intel series)

• The CPU of a computer consists of ALU, CU and memory.


• If all these components can be organized on a single chip by means of
SSI, MSI, LSI, VLSI, ELSI technology, then such chip is called
microprocessor.
• It can fetch instructions from memory, decode and execute them,
perform logical and arithmetic functions, accept data from input
devices and send results to the output devices.
• The evolution of microprocessor is dependent on the development
of integrated circuit technology from single scale integration (SSI) to
giga scale integration (GSI).
Processing Cycle of a Stored Program Computer

• Fetch Instruction: Read the instruction from memory.


• Decode instruction : Identify the function of instruction using
suitable decoder.
• Fetch Data : Read the data from memory.
• Process and Execute instruction: Perform the exact task by executing
it.
• Write result to memory: Store the result in memory
• Fetch next instruction and so on....
Microinstructions and Microoperations
• A computer executes a program consisting instructions.
• Each instruction is made up of shorter sub-cycles as fetch, indirect,
execute cycle, and interrupt.
• Performance of each cycle has a number of shorter operations called
micro-operations.
• Called so because each step is very simple and does very little.
• Thus micro-operations are functional atomic operation of CPU.
• Hence events of any instruction cycle can be described as a sequence
of micro- operations.
Microinstructions
• Each instruction is characterized with many machine cycles and each
cycle is characterized with many T-states.
• The lower instruction level patterns which are the numerous
sequences for a single instruction are known as microinstructions.
• Suppose we can visualize the microinstruction with the help of fetch
cycle, or read cycle or write cycle.
Fetch – Registers
• Memory Address Register (MAR)
• – Connected to address bus
• – Specifies address for read or write op
• Memory Buffer Register (MBR)
• – Connected to data bus
• – Holds data to write or last data read
• Program Counter (PC)
• – Holds address of next instruction to be fetched • Instruction
Register (IR)
• – Holds last instruction fetched
Fetch Sequence
• Address of next instruction is in PC
• Address (MAR) is placed on address bus
• Control unit issues READ command
• Result (data from memory) appears on data bus
• Data from data bus copied into MBR
• PC incremented by 1 (in parallel with data fetch from memory)
• Data (instruction) moved from MBR to IR
• MBR is now free for further data fetches
Fetch Sequence (symbolic)
• (tx = time unit/clock cycle)

t1: MAR <- PC


t2: MBR <- (memory or MAR) , PC <- PC +1
t3: IR <- MBR
Control Unit
• The control unit is the heart of CPU.
• It gets instruction from memory.
• The control unit decides what the instructions mean and directs the
necessary data to be moved from memory to ALU.
• It must communicate with both ALU and main memory. It
coordinates all activities of processor unit, peripheral devices and
storage devices.
• Two types of control unit can be implemented in computing systems.
Hardwired Control Unit

• This CU is essentially a combinatorial circuit It s i p logic signals are


transformed into set of o/p logic signals which are control signals.
• The CU performs different operations in the basis of op-codes.
• We have to derive the Boolean expression for each control signal as a
function of input.
• Since modern processor needs a Boolean equation, it is very difficult
to build a combinational circuit that satisfies all these operations.
• It has faster mode of operation.
• A hardwired control unit needs rewiring if design has to be modified.
Micro-programmed Control Unit

• An alternative to hardwired CU.


• In micro-programmed control unit, the control information is stored in control
memory.
• The control memory is programmed to initiate required sequence of operations.
• Use sequences of instructions to perform control operations performed by micro
operations.
• Control address register contains the address of the next microinstruction to be
read
• As it is read, it is transferred to control buffer register.
• Sequencing unit loads the control address register and issues a read command.
• It is cheaper and simple than hardwired CU.
• It is slower than hardwired CU.
Introduction to Register Transfer Language (RTL)

• The symbolic notation used to describe the micro operation transfers among
register is called register transfer language.
• It is one of the forms of hardware description language (HDL).
• The term register transfer implies the availability of hardware logic circuits that
can perform a stated instruction and transfer the data.
• It also transfers result of the operation to the same or another register. The term
language is borrowed from programmers who apply this term to programming
language.
• RTL is the convenient tool for describing the internal organization of digital
computers in concise and precise manner.
• It can also be used to facilitate the design process of digital systems such as
microprocessors.
Fetch and execute cycle of MOV A, B in terms of
RTL specification:
• Within the fetch cycle, the operations performed during execution
of instruction MOV A, B are:
• First step: The program counter contains the address of the next
instruction to be executed. If the next instruction to be executed is
MOV A, B; the program counter contains the address of the
memory location where the instruction code for MOV A, B resides.

• In the first operation of fetch cycle, the contents of program


counter will be transferred to the memory address register (MAR).
• The memory address register then uses the address bus to
transmit its contents that specifies the address of memory location
from where that instruction code of MOV A, B is to be fetched.
• Let t1 indicates the period of first operation
• T1: MAR çPC

Second step:
• When the control unit issues the memory read signal, the contents o f
the address memory location specified by MAR will be transferred to
the memory buffer register (MBR).
• Suppose t2 is the time period for this operation.
• t2 : MBR ç Memory or [MAR]
Third step:
Finally the contents of MBR will be transferred to the instruction
register and then the program counter gets incremented.
Let t3 be the time required by the CPU to complete these operations.

t3 : IR ç (MBR)
PC ß PC + 1
• After the fetch cycle completed, the execution starts. The execute
cycle steps:
First step:
At the start of execution cycle, the instruction register (IR) consists of
instruction code for instruction MOV A, B.
The address field of instructions specifies the addresses of the two
memory locations A & B.
The first step needed is to obtain the data from the location B.
For this the address field of IR indicating the address of memory
location will be transferred to address bus through the MAR.
Let t1 be this time taken
T1: MAR ß(IR(address of B))
Second step:
When the control unit issues a memory read signal, the contents of
location B will be output (written) to the memory buffer register (MBR).
Now the content of B which is to be written to memory location A is
contained in MBR.
T2: MBRßB

Third step:
Now, we need the memory location of A because it is being written
with the data of location B.
For this the address field of IR indicating the address of memory
location A.
T3: MAR ß(IR(address of A))
Fourth step:
When the control unit issues the memory write signal, the contents of
MBR will be written to the memory location indicated by the contents
of MAR in time t4.

T4: AßMBR

Program consists of instructions which contains different cycles like


fetch and execute.
These cycles in turn are made up of the smaller operation called
micro operations.
RTL Examples
Advantages of Microprocessor:

• Computational/Processing speed is high


• Intelligence has been brought to systems
• Automation of industrial process and office automation
• Flexible
• Compact in size
• Maintenance is easier
Applications of Microprocessors:
• Microcomputer: Microprocessor is the CPU of the microcomputer.
• Embedded system: Used in microcontrollers.
• Measurements and testing equipment: used in signal generators, oscilloscopes, counters,
• Digital voltmeters, x-ray analyzer, blood group analyzers baby incubator, frequency
• Synthesizers, data acquisition systems, spectrum analyzers etc.
• Scientific and Engineering research.
• Industry: used in data monitoring system, automatic weighting, batching systems etc. Security
systems: smart cameras, CCTV, smart doors etc.

• Automatic system such as device control equipment's

• Communication system
• Some Examples are:
– Calculators
– Accounting system
– Games machine
– Complex Industrial Controllers – Traffic light Control
– Data acquisition systems
– Military applications

You might also like