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

Unit 1 Microprocessor A

Read it

Uploaded by

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

Unit 1 Microprocessor A

Read it

Uploaded by

prajwalbikram731
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

Microprocessor

and
Computer Architecture
Prepared by:
Er. Binod Kumar Rajbhar

BE-Computer
ME-Computer

7/30/2024 Er. Binod Kumar Rajbhar 1


Unit:1
Fundamentals of Microprocessor

Prepared by
Er. Binod Rajbhar

7/30/2024 Er. Binod Kumar Rajbhar 2


Microprocessor:
Introduction of Microprocessor
Microprocessor is a small- sized electronic component inside a computer
that carries out various task involved in data processing as well as arithmetic
and logical operations.
Microprocessor is built over an integrated circuit comprising millions of
small components like resistors, transistor and diodes.
In simple words, a Microprocessor is a digital device on a chip that can fetch
instructions from memory, decode and execute them and give results.
It is a programmable, multipurpose, clock -driven, register-based electronic
device that reads binary instructions from a storage device called memory,
accepts binary data as input and processes data according to those
instructions and provides results as output.

7/30/2024 Er. Binod Kumar Rajbhar 3


Block Diagram of a Microprocessor

7/30/2024 Er. Binod Kumar Rajbhar 4


How does a Microprocessor Work?

The microprocessor follows a sequence: Fetch, Decode, and then Execute.

Initially, the instructions are stored in the memory in a sequential order.


The microprocessor fetches those instructions from the memory, then
decodes it and executes those instructions till STOP instruction is reached.
Later, it sends the result in binary to the output port.
Between these processes, the register stores the temporarily data and ALU
performs the computing functions

7/30/2024 Er. Binod Kumar Rajbhar 5


Features of a Microprocessor
Some of the most features of any microprocessor −
Cost-effective − The microprocessor chips are available at low prices and
results its low cost.
Size − The microprocessor is of small size chip, hence is portable.
Low Power Consumption − Microprocessors are manufactured by using
Metal-oxide semiconductor technology, which has low power consumption.
Versatility − The microprocessors are versatile as we can use the same chip in
a number of applications by configuring the software program.
Reliability − The failure rate of microprocessors is very low, hence it is
reliable.
7/30/2024 Er. Binod Kumar Rajbhar 6
Microprocessor Architecture & Operation

7/30/2024 Er. Binod Kumar Rajbhar 7


ALU (Arithmetic/Logic Unit) – It performs such arithmetic operations as
addition and subtraction, and such logic operations as AND, OR, and XOR.
Results are stored either in registers or in memory.
Register Array – It consists of various registers identified by letter such as B, C,
D, E, H, L, IX, and IY. These registers are used to store data and addresses
temporarily during the execution of a program.
Control Unit – The control unit 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 and peripherals.
Input – The input section transfers data and instructions in binary from the
outside world to the microprocessor. It includes such devices as a keyboard,
switches, a scanner, and an analog-to-digital converter.

7/30/2024 Er. Binod Kumar Rajbhar 8


 Output – The output section transfers data from the
microprocessor to such output devices as LED, CRT, printer,
magnetic tape, or another computer.

 Memory – It stores such binary information as instructions and


data, and provides that information to the microprocessor. To
execute programs, the microprocessor reads instructions and
data from memory and performs the computing operations in
its ALU section. Results are either transferred to the output
section for display or stored in memory for later use.
 System bus – It is a communication path between the
microprocessor and peripherals. The microprocessor
communicates with only one peripheral at a time. The timing is
provided by the control unit of the microprocessor.

7/30/2024 Er. Binod Kumar Rajbhar 9


Microprocessor system with Bus organization
Bus is a group of conducting wires which carries information, all the
peripherals are connected to microprocessor through Bus.
Diagram to represent bus organization system of 8085
Microprocessor.

7/30/2024 Er. Binod Kumar Rajbhar 10


Address bus –
It is a group of conducting wires which carries address only.
Address bus is unidirectional because data flow in one direction, from
microprocessor to memory or from microprocessor to Input/output devices
(That is, Out of Microprocessor).
Data bus –
 It is a group of conducting wires which carries Data only.
Data bus is bidirectional because data flow in both directions, from
microprocessor to memory or Input/Output devices and from memory or
Input/Output devices to microprocessor.

7/30/2024 Er. Binod Kumar Rajbhar 11


Control bus –
It is a group of conducting wires, which is used to generate timing and
control signals to control all the associated peripherals, microprocessor uses
control bus to process data, that is what to do with selected memory
location.
Some control signals are:
• Memory read
• Memory write
• I/O read
• I/O Write
• Opcode fetch

7/30/2024 Er. Binod Kumar Rajbhar 12


Pin Diagram of 8085 Microprocessor

7/30/2024 Er. Binod Kumar Rajbhar 13


X1 AND X2:
The x1 and x2 represent the crystal oscillator which will provide frequency
for the microprocessor.
Address Bus (A8-A15):
The address bus pins range from A8 to A15 and these pins do the data
transfer only.
Address Bus (or) Data Bus (AD0-AD7):
The address bus pins or data bus pins range from AD0 to AD7, and these pins
are called multiplexing lines that can do both addresses as well as data
transfer.

7/30/2024 Er. Binod Kumar Rajbhar 14


Address Latch Enable (ALE):
It is an active high signal. It represents the status of data lines (AD0-AD7).
 If the value is positive then it indicates that the address is going in the lines and if
the value is negative then data is travelling in the lines.
Status Signal (IO/M):
It tells us whether the address is intended for memory or input/output.
 In the case when we get a positive signal it represents that we have got i/o read or
i/o write and when we get a negative signal it represents memory activation.
Status Signals (S0-S1):
The status signals S0, and S1 give different functions as well as status based on
their status.
• 01 then the operation will be HALT.
• 10 then the operation will be WRITE
• 10 then the operation will be READ
• 11 then the operation will be FETCH
7/30/2024 Er. Binod Kumar Rajbhar 15
RD:
The RD is an energetic low signal and it is used for controlling the microprocessor READ
operation.
When the RD pin goes small then the 8085 microprocessor understands the information
from the I/O device or memory.
WR:
It has the power to control the microprocessor’s write operations.
When the WR pin goes small the data will be written to the I/O device or memory.
READY:
The READY pin is for ensuring whether a device is set for accepting or transferring data.
When the pin is high the device is ready for transfer, if it is not then the microprocessor
stays until this pin goes high.
HOLD:
The HOLD pin specifies when any device is demanding the use of an address as well as a
data bus.
HLDA:
It is the response signal of HOLD and is used to specify whether this signal is obtained or
not. This signal will go low after the implementation of HOLD demand.
7/30/2024 Er. Binod Kumar Rajbhar 16
INTR:
This is an interrupt signal, and the priority of this among the interrupts is low.
This signal can be allowed or not allowed by the software.
The 8085 microprocessor completes the instruction which is being executed when the
INTR pin goes high and recognizes the INTR signal and progresses it.
INTA:
INTA stands for interrupt acknowledgement. Whenever an interrupt signal comes, then
it should be recognized by INTA.
RST 5.5, RST 6.5, RST 7.5:
• These are the restart maskable interrupts or Vectored Interrupts which are used for the
insertion of an inner restart function repeatedly. All these interrupts are maskable.
TRAP
• TRAP is a non-maskable interrupt, and it doesn’t allow or stop a program. TRAP has
maximum precedence between interrupts. The priority order is TRAP, RST 5.5, RST 6.5,
RST 7.5, and INTR.
7/30/2024 Er. Binod Kumar Rajbhar 17
RESET IN:
• It is used to reset the program counter toward zero. It also rearranges interrupt
enable as well as HLDA flip-flops (FFs).
RST (RESET) OUT:
• It will reset all the devices connected to the microprocessor.
X1 X2:
• X1, and X2 terminals that are associated with the exterior oscillator for generating
the required as well as appropriate operation of a clock.
CLK:
• Sometimes CLK signal has to be generated from microprocessors that can be used in
favour of other peripherals or else other digital integrated circuits. This is offered
with a CLK pin.
SID and SOD:
• These two pins are used for serial data communication
VSS and VCC:
• VSS7/30/2024
is a ground pin whereas Vcc is a Er.+5v pin.
Binod Kumar Rajbhar 18
8085 Microprocessor & its Operation
 8085 is pronounced as "eighty-eighty-five" microprocessor. It is an
8-bit microprocessor designed by Intel in 1977 using NMOS
technology.
 It has the following configuration –
- 8-bit data bus
- 16-bit address bus, which can address up to 64KB
- A 16-bit program counter
- A 16-bit stack pointer
- Six 8-bit registers arranged in pairs: BC, DE, HL
- Requires +5V supply to operate at 3.2 MHZ single phase clock

 It is used in devices such as washing machines, microwave ovens, mobile


phones, etc.

7/30/2024 Er. Binod Kumar Rajbhar 19


8085 Microprocessor Architecture & Functional
Units

7/30/2024 Er. Binod Kumar Rajbhar 20


Fig: Block Diagram of 8085 Microprocessor
8085 consists of the following functional units −
1)Accumulator
It is an 8-bit register used to perform arithmetic, logical, I/O & LOAD/STORE operations. It is
connected to internal data bus & ALU.

2)Arithmetic and logic unit


As the name suggests, it performs arithmetic and logical operations like Addition, Subtraction, AND,
OR, etc. on 8-bit data.

3)General purpose register


There are 6 general purpose registers in 8085 processor, i.e. B, C, D, E, H & L. Each register can hold 8-
bit data. These registers can work in pair to hold 16-bit data and their pairing combination is like B-C,
D-E & H-L.

4)Program counter
It is a 16-bit register used to store the memory address location of the next instruction to be executed.
Microprocessor increments the program whenever an instruction is being executed, so that the
program counter points to the memory address of the next instruction that is going to be executed.
7/30/2024 Er. Binod Kumar Rajbhar 21
1) Stack pointer
It is also a 16-bit register works like stack, which is always
incremented/decremented by 2 during push & pop operations.

2) Temporary register
It is an 8-bit register, which holds the temporary data of arithmetic and logical
operations.

3) Flag register
It is an 8-bit register having five 1-bit flip-flops, which holds either 0 or 1
depending upon the result stored in the accumulator.
These are the set of 5 flip-flops –
- Sign (S)
- Zero (Z)
- Auxiliary Carry (AC)
- Parity (P)
- Carry (C)

Its bit position is shown in the following table –

D7 D6 D5 D4 D3 D2 D1 D0
7/30/2024
S Z AC
Er. Binod Kumar Rajbhar
P CY 22
1) Instruction register and decoder
It is an 8-bit register. When an instruction is fetched from memory then it is
stored in the Instruction register. Instruction decoder decodes the information
present in the Instruction register.

2) Timing and control unit


It provides timing and control signal to the microprocessor to perform operations.
Following are the timing and control signals-
- Control Signals: READY, RD’, WR’, ALE
- Status Signals: S0, S1, IO/M’
- DMA Signals: HOLD, HLDA
- RESET Signals: RESET IN, RESET OUT

3) Interrupt control
As the name suggests it controls the interrupts during a process. When a
microprocessor is executing a main program and whenever an interrupt occurs,
the microprocessor shifts the control from the main program to process the incoming
request. After the request is completed, the control goes back to the main
program.
There are 5 interrupt signals in 8085 microprocessor: INTR, RST 7.5, RST 6.5, RST 5.5,
7/30/2024 TRAP. When microprocessor receivesEr. Binodinterrupt
Kumar Rajbharsignals, it sends an acknowledgement 23
1) Serial Input/output control
It controls the serial data communication by using these two instructions: SID
(Serial input data) and SOD (Serial output data).

2) Address buffer and address-data buffer


The content stored in the stack pointer and program counter is loaded into the
address buffer and address-data buffer to communicate with the CPU. The
memory and I/O chips are connected to these buses; the CPU can exchange the
desired data with the memory and I/O chips.

3) Address bus and data bus


Data bus carries the data to be stored. It is bidirectional, whereas address bus carries
the location to where it should be stored and it is unidirectional. It is used to transfer
7/30/2024
the data & Address I/O devices. Er. Binod Kumar Rajbhar 24
8085 Pin Configuration

7/30/2024 Er. Binod Kumar Rajbhar 25


The pins of a 8085 microprocessor can be classified into seven groups −
1) Address bus
A15-A8, it carries the most significant 8-bits of memory/IO address.

2) Data bus
AD7-AD0, it carries the least significant 8-bit address and data bus.

3) Control and status signals


These signals are used to identify the nature of operation. There are 3 control
signal and 3 status signals.
Three control signals are RD, WR & ALE.

a) RD − This signal indicates that the selected IO or memory device is to be read and
is ready for accepting data available on the data bus.

b) WR − This signal indicates that the data on the data bus is to be written into a
selected memory or IO location.
7/30/2024 Er. Binod Kumar Rajbhar 26
a) ALE − It is a positive going pulse generated when a new operation is started by the
microprocessor. When the pulse goes high, it indicates address. When the pulse
goes down it indicates data.

Three status signals are IO/M, S0 & S1.

IO/M’
This signal is used to differentiate between IO and Memory operations, i.e. when it is
high indicates IO operation and when it is low then it indicates memory operation.

S1&S0
These signals are used to identify the type of current operation.

2) Power supply
There are 2 power supply signals − VCC & VSS. VCC indicates +5v power supply
and VSS indicates ground signal.

3) Clock signals
There are 3 clock signals, i.e. X1, X2, CLK OUT.

4) Interrupts & externally initiated signals


Interrupts are the signals generated by external devices to request the
microprocessor to perform a task. There are 5 interrupt signals, i.e. TRAP, RST 7.5,
RST 6.5, RST 5.5, and INTR.

5) Serial I/O signals


There are 2 serial signals, i.e. SID (Serial output data line) and SOD (Serial input
data line) and these signals are used for serial communication.
7/30/2024 Er. Binod Kumar Rajbhar 27
Internal architecture of 8085 microprocessor
The Intel 8085 A is a complete 8 bit parallel central
processing unit.
The main components of 8085A are array of registers, the
arithmetic logic unit, the encoder/decoder, and timing and
control circuits linked by an internal data bus.

7/30/2024 Er. Binod Kumar Rajbhar 28


The block diagram is shown below:

7/30/2024 Er. Binod Kumar Rajbhar 29


1. ALU:-
 The arithmetic logic unit performs the computing functions, it includes the accumulator, the
temporary register, the arithmetic and logic circuits and five flags.
 The temporary register is used to hold data during an arithmetic/logic operation.
 The result is stored in the accumulator; the flags (flip-flops) are set or reset according to the
result of the operation.
2. Accumulator (register A):
 It is an 8 bit register that is the part of ALU.
 This register is used to store the 8-bit data and to perform arithmetic and logic operations and
8085 microprocessor is called accumulator based microprocessor.
• When data is read from input port, it first moved to accumulator and when data is sent to output
port, it must be first placed in accumulator
2. Temporary registers(W & Z):
 They are 8 bit registers not accessible to the programmer.
 During program execution, 8085A places the data into it for a brief period.

7/30/2024 Er. Binod Kumar Rajbhar 30


2. Instruction register(IR):
 It is a 8 bit register not accessible to the programmer.
 It receives the operation codes of instruction from internal data bus and passes to
the instruction decoder which decodes so that microprocessor knows which type
of operation is to be performed.

2. Register Array: (Scratch pad registers B, C, D, E):
 It is a 8 bit register accessible to the programmers.
 Data can be stored upon it during program execution.
 These can be used individually as 8-bit registers or in pair BC, DE as 16 bit
registers.
 The data can be directly added or transferred from one to another.
 Their contents may be incremented or decremented and combined logically with
the content of the accumulator.
7/30/2024 Er. Binod Kumar Rajbhar 31
• Register H & L: - They are 8 bit registers that can be used in same
manner as scratch pad registers.
• Stack Pointer (SP): - It is a 16 bit register used as a memory pointer.
It points to a memory location in R/W memory, called the stack. The
beginning of the stack is defined by loading a 16-bit address in the stack
pointer.
•Program Counter (PC): - Microprocessor uses the PC register to
sequence the execution of the instructions. The function of PC is to
point to the memory address from which the next byte is to be fetched.
When a byte is being fetched, the PC is incremented by one to point to
the next memory location.

7/30/2024 Er. Binod Kumar Rajbhar 32


6.Flags:
Register consists of five flip flops, each holding the status of different states separately is known as flag
register and each flip flop are called flags.
 8085A can set or reset one or more of the flags and are sign(S), Zero (Z), Auxiliary Carry (AC) and
Parity (P) and Carry (CY).
 The state of flags indicates the result of arithmetic and logical operations, which in turn can be used
for decision making processes.
 The different flags are described as:

 Carry: - If the last operation generates a carry its status will 1 otherwise 0. It can handle the carry
• or borrow from one word to another.
 Zero: - If the result of last operation is zero, its status will be 1 otherwise o. It is often used in loop
• control and in searching for particular data value.
 Sign: - If the most significant bit (MSB) of the result of the last operation is 1 (negative), then its
• status will be 1 otherwise 0.
 Parity: - If the result of the last operation has even number of 1’s (even parity), its status will be 1
• otherwise 0.
 Auxiliary carry: - If the last operation generates a carry from the lower half word (lower nibble),
its7/30/2024
status will be 1 otherwise 0. Used for performing BCD
Er. Binod Kumar arithmetic.
Rajbhar 33
7. Timing and Control Unit:
 This unit synchronizes all the microprocessor operations with the clock and
generates the control signals necessary for communication between the

microprocessor and peripherals.
 The control signals are similar to the sync pulse in an oscilloscope.
 The and signals are sync pulses indicating the availability of data on the data
bus.
8. Interrupt controls:
• The various interrupt controls signals (INTR, RST 5.5, RST 6.5, RST 7.5 and
TRAP) are used to interrupt a microprocessor.
9.Serial I/O controls: Two serial I/O control signals (SID and SOD) are used to
implement the serial data transmission

7/30/2024 Er. Binod Kumar Rajbhar 34

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy