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

Microprocessor

The document provides an overview of microprocessors, detailing their components such as the ALU, registers, and control unit, as well as their functions in fetching, decoding, and executing instructions. It outlines the evolution of microprocessors from the first generation Intel 4004 to the fifth generation Pentium, highlighting key features and advancements in each generation. Additionally, it explains the architecture of the 8085 microprocessor, including its interrupt system, bus structure, and various types of registers and flags.

Uploaded by

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

Microprocessor

The document provides an overview of microprocessors, detailing their components such as the ALU, registers, and control unit, as well as their functions in fetching, decoding, and executing instructions. It outlines the evolution of microprocessors from the first generation Intel 4004 to the fifth generation Pentium, highlighting key features and advancements in each generation. Additionally, it explains the architecture of the 8085 microprocessor, including its interrupt system, bus structure, and various types of registers and flags.

Uploaded by

Arm
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 60

XII CS

PAPER-II

MICROPROCESSOR
MICROPROCESSOR

A microprocessor can be divided into three


parts:

ALU Registers

Control Unit
MICROPROCESSOR

A.L.U
A.L.U is arithmetic and logic unit . Where
arithmetic and logical operation are carried
out.
Arithmetic means addition , subtraction ,
multiplication , division operation.
Logical means AND,OR,NOT,EX-OR
operation.
MICROPROCESSOR

Register
Register are used to store data temporarily
during execution of program.
Control Unit
Control unit controls flow of data.
It provides timing and control signals to the
whole system.
Microprocessor Function

To fetch , decode and execute instructions.


To transfer data from one block to another
block .
To give proper response to interrupts
according to the priority.
To provide timing control and timing signals
to the whole system according to the
instruction.
Evolution(History) of microprocessor

First generation
Intel’s 4004 was the first microprocessor available
in the market.
It was a 4 bit microprocessor introduced in 1971.
It was designed to used be used in calculators.
In 1972 , Intel introduced first general purpose 8-
bit microprocessor Intel 8008.
It could perform arithmetic and logical operation.
Example: Intel’s 4004(4 bit), 8008 (8 bit)
Evolution(History) of microprocessor

Second generation
In 1974, 8 bit microprocessor were
introduced .
During 2nd generation , the development of
microprocessor has been in a direction to
complete microprocessor system i.e. CPU ,
ROM , RAM , Clock, I/O ports all in a single
package.
Example INTEL’s 8085(8-bit)
Evolution(History) of microprocessor

Third generation
Intel introduced 16 bit microprocessor 8086 in
1976.
The other major direction of microprocessor
evolution has been towards one which perform all
function of minicomputer , which an work with
words , bytes , bits.
In 3rd generation , memory space was 64 kb .
The other features were full arithmetic execution
and efficient higher level language addressing.
Example Intel’s 8086 (16-bit)
Evolution(History) of microprocessor

Fourth generation
In 1981 , Intel introduced first 32 bit
microprocessor 80386.
It can address physical memory of 4 GB.
Example : 80386 (32 bit)
Evolution(History) of microprocessor

Fifth generation
Intel made a improvement in microprocessor
design to provide greatest speed .
Also system can run on new OS like UNIX ,
LINUX.
The processor in this generation is generally
called by name Pentium.
It is 64 bit microprocessor.
PIN DIAGRAM OF MICROPROCESSOR 8085
MICROPROCESSOR

There are 3 clock signals.


1) X1
2) X2
3) CLK OUT
X1 and X2
4) The X1 and X2 are connected to an external crystal.
5) It is used to set frequency of the internal clock generator.
CLK OUT
6) This signal is used as the system clock for devices
connected with the microprocessor.
7) The speed of the system depends on the clock frequency.
8) Clock frequency- the speed at which a microprocessor
executes instruction.
MICROPROCESSOR

What is an interrupt?
1) Interrupt is a signal , which suspends the normal
sequence of microprocessor and then
microprocessor gives service to that device
which has given the signal.
2) After completing the service , microprocessor
again returns to the main program.
3) Microprocessor 8085 has two types of interrupts
a) software interrupt b) hardware interrupt
MICROPROCESSOR

8085 provides 5 hardware interrupts


TRAP
RST 7.5
RST 6.5
RST 5.5
INTR
(Maskable interrupt made pending)
 ( Non-maskable interrupt can not made
pending)
MICROPROCESSOR

TRAP
 This signal is used to interrupt the microprocessor.
 This is an vectored and non-maskable interrupt.
 It has the highest priority.
 When an interrupt is recognized the next
instruction is executed from a fixed location in the
memory i.e. 0024H
 Its vector address is 0024H.
RST 7.5( RST RESTART)
 RESATRT INTERRUPT: This signal is used to
interrupt the microprocessor.
MICROPROCESSOR

This is an vectored , maskable interrupt.


It has the second highest priority.
When an interrupt is recognized the next
instruction is executed from a fixed location
in the memory i.e. 0037H
Its vector address is 003CH(7.5*8=0037H)
They cause an internal restart.
MICROPROCESSOR

RST 6.5( RST RESTART)


RESATRT INTERRUPT: This signal is used to
interrupt the microprocessor.
This is an vectored , maskable interrupt.
It has the forth highest priority.
When an interrupt is recognized the next
instruction is executed from a fixed location
in the memory i.e. 002CH
Its vector address is 002CH(7.5*8=002CH)
They cause an internal restart.
RST 5.5( RST RESTART)
RESATRT INTERRUPT: This signal is used to
interrupt the microprocessor.
This is an vectored , maskable interrupt.
It has the third highest priority.
When an interrupt is recognized the next
instruction is executed from a fixed location
in the memory i.e. 0034H
Its vector address is 0034H(7.5*8=0034H)
They cause an internal restart.
INTR (INTERRUPT REQUEST)
This is non-vectored, non-maskable interrupt.
This is interrupt request signal.
It has the lowest priority.
It has an acknowledgement signal INTA.
INTA
This is interrupt acknowledge.
The microprocessor acknowledge an
interrupt request by the INTR signal.
This signal is used to get the Op-Code.
SERIAL CONTROL

1) This block is responsible for transferring data


serially to and from the microprocessor.
2) It has the following pins:
SID
SOD
SID (SERIAL IN DATA)
Microprocessor receives data , bit by bit through
this line.
SOD(SERIAL OUT DATA)
Microprocessor send data , bit by bit through this
line.
POWER SUPPLY

Vcc: +5V power supply.


Vss: Ground reference.
CONTROL AND STATUS SIGNAL
ALE
RD
WR
IO/M
S1 and S0
Control signal

ALE
This is address latch enable.
It is used to inform the peripheral when the
address / data bus is sending an address and
when it is functioning as data bus.
RD
This is Read control signal.
This is an active low signal used to indicate a
read operation.
Control signal

WR
This is write control signal.
This is an active low signal used to indicate a
write operation.
IO/M
This is a status signal used to differentiate
between I/O and memory operation.
When it is high, it indicates an I/O operation.
When it is low , it indicates a memory
operation.
Control signal

S1 and S0
These are status signal.
They can identify various operations.
S0 S1 Status
0 0 Halt

1 0 Write
0 1 Read
1 1 Fetch (send)
Control signal

RESET IN :
 This is an active low signal activated when the reset signal is
applied to the microprocessor.
 This signal resets the microprocessor.
 On Reset PC contains 0000H . Hence , the Reset Vector Address of
8085 is 0000H.

RESET OUT:
 This pin indicates that the CPU has been reset by RESET IN.
 This signal is connected to the reset input of all the peripherals.
 It is used to reset the peripherals once the microprocessor is reset.
Control signal

HOLD
When HOLD pin is activated by an external
signal , the microprocessor relinquishes(leave)
control of buses and allows the external
peripherals to use them.
It is used for Direct Memory Access(DMA).
HLDA
This is hold acknowledge.
Microprocessor acknowledge the hold request by
HLDA.
It is used for Direct Memory Access(DMA).
Address Bus/Address Data Bus

BUS
The bus is a communication path between
microprocessor and peripherals.
A bus is a collection of lines , which perform
the some logical task.
A collection of wires through which data is
transmitted from one part of a computer to
another.
The size of a bus indicates the number of
lines in it, and hence the number of bits the
bus can carry- as one line carries one bit of
information.
BUS

There are 3 types of buses:


 Address Bus
 Data Bus
 Control Bus
Address Bus:
 The address bus is a group of 16 lines generally identified
as A0 to A15.
 This bus carries the address of a particular location , for a
transfer.
 The address bus is unidirectional , bits flow in one direction
from the microprocessor to peripheral devices.
 The MPU uses the address bus to identify a peripheral or
memory location.
BUS

Data Bus:
 The data bus is a group of eight lines used for data
flow.
 These lines are bi-directional , data flow in both
directions between the microprocessor and memory
and peripheral device.
Control Bus :
 This bus carries the control signal that would cause
any kind of an operation.
 The basic control signals are RD,WR etc.
Together these three buses are called as the
SYSTEM BUS .
Data address Register:
The data register is a two 8 bit registers that
can be used separately or as a combined pair.
They are labeled as H and L(high order and
low order byte) .
They are general purpose register.
Data can be stored in these registers.
When they are used in pair, 16 bit address
can also be stored in these registers.
MEMORY

Memory stores binary information such as


data , and provides that information to the
microprocessor whenever necessary.
To executes programs, the microprocessor
reads instructions and data from memory and
perform computing operations in its ALU
section.
Input / Output(I/O)
This section communicates with outside
world.
I/O devices are also known as peripherals.
Block diagram of ALU
ALU

 ALU is 8 bit unit.


 It performs arithmetic, logic , rotate operation.
 It consist of binary adder to perform addition and subtraction by
2’s compliment method.
 The result is typically stored in accumulator.
 The temporary register is used to hold data during arithmetic /
logic operation.
 Flags are set or Reset according to the result of operation in status
register.
 Adder perform arithmetic operation like addition, subtraction ,
increment , decrement etc. with the result being fed back into
accumulator via internal bus.
 Shifter perform logical operation like rotate left , rotate right
etc .Result is placed in accumulator.
 Status register are set or reset according to ALU operation.
Registers
Registers

 8085 uses both 8 bit and 16 bit registers.


 Registers Used-
(1) Simple register (main register)
(2)General purpose register
(3)Special function register
(4)Other register
Simple register:
 A- Accumulator ( 8 bit)
 It is 8 bit programmable register.
 The user has complete access to this register.
 It has 2 special properties :
 It holds one of the operands during most of the arithmetic
operation.
 It holds the result of most of the arithmetic and logic operation.
Registers

General purpose registers


The 8085 have six general purpose register
to store 8 bit data during program execution .
These registers are identified as B,C,D,E,H
and L.
They can be combined as register pairs-
BC,DE and HL to perform some 16 bit.
The HL pair also holds the address for the
memory pointer M.
Register

Special function register


Stack pointer & program counter are two special
function register these are those register which
are used only by microprocessor not by user.
Program counter-
PC is 16 bit register.
It contains the address of next instruction to be
executed.
It always points to the memory location of next
instruction to be executed.
This register is used by microprocessor.
Register

Stack Pointer-
SP is 16 bit register.
SP holds the address of top of stack.
The stack is used to save the content of
registers during the execution of a program.
The stack pointer maintains the address of
last byte entered in stack.
The SP is decremented each time data is
pushed onto the stack and is incremented
each time data is popped off the stack.
Register

Other Registers-
1) Instruction Registers
2) Temporary Register
a) Instruction Registers-
1) This is 8 bit register.
2) It will store opcode (8 Bit) of an instruction.
b) Temporary register-
1)This is 8 bit register.
2) It will store the data temporary before
execution of instruction.
FLAG
Flag

1) Flag register in 8085 is a one byte(8 bits)


register used to store 5 flags.
2) 2) The flag register of 8085 holds the status of
the current operation of the ALU . It has the
following:
S- Sign Flag(+,-)
It is set (1) when the MSB of the result is 1.(i.e.
the result is a –ve number)
It is reset (0) when the MSB of the result is
0( i.e. the result is a +ve number)
Example :
Flag
Flag

Z – Zero Flag
The zero flag is set to 1 if the ALU operation
results in 0.
The flag is reset if the result is non- zero.
AC- Auxiliary carry flag
In an arithmetic operation , when carry is
generated by digit A3 and passed on to digit
A4 the AC flag is set.
The flag is used only internally operations
and is not available for the programmer.
Flag

P-Parity Flag(number of 1 bit in accumulator)


 This flag tests for number of 1 bits in accumulator.
 It is set when the result has even parity.
 It is reset when the result has odd parity.

C-Carry Flag
 It is set when a carry is generated from the MSB.
 It is reset when a carry is not generated from the MSB.
Machines Cycle
Machines Cycle

Instruction Cycle
This is the time required by the
microprocessor to fetch and execute 1
instruction.
The instruction cycle is in 2 parts.
1 Fetch Cycle
2 Execute Cycle
Fetch Cycle:
This is the time required by the
microprocessor to fetch all bytes of an
instruction.
Machines Cycle

Execution Cycle:
This is the time required by the
microprocessor to execute a fetched
instruction.
T-State:
 A T-state is one clock cycle of the
microprocessor.
Machine Cycle
It is the time required by the microprocessor
doing one operation .
Machines Cycle
FUNCTIONAL BLOCK DIAGRAM OF 8085
Software Interrupts

What are software interrupts?


1) The normal operation of a microprocessor
can be interrupted by special instruction .
Such as interrupt is called a software
interrupt.
2) 8085 provides 8 user defined software
interrupts RST 0 to RST 7 where RST means
restart.
3) These interrupts are vectored interrupts
and when these interrupts are called the
control is transferred to the memory to the
memory location .
Software Interrupts

Interrupt Mnemonics Call location

RST 0 0000

RST 1 0008

RST 2 0010

RST 3 0018

RST 4 0020

RST 5 0028

RST 6 0030

RST 7 0038
Software Interrupts

 Software interrupts are not used to handle asynchronous events.


They are used to call software routines like break point
( a breakpoint is an intentional stopping or pausing place in a
program) etc.
 (When you execute something synchronously, you wait for it to
finish before moving on to another task. When you execute
something asynchronously, you can move on to another task
before it finishes.)
 These interrupts are requested by executing interrupt
instructions.
 After execution of these interrupts , program counter is
incremented.
 These interrupts can not be ignored or masked . They have more
priority than any hardware interrupt.
 They are used in program debugging.
Differentiate between hardware n software interrupt

Hardware interrupt Software interrupt


 1) H/W interrupt are used to handle 1) S/w interrupt are not used to handle
asynchronous events. asynchronous events.
2) These interrupt are requested by 2) These interrupts are not requested by
external device. external device by microprocessor
3) After execution of these interrupt itself.
program counter is not incremented. 3) After execution of these interrupt,
4) These interrupt may be non- program counter is incremented.
maskable or maskable. 4) They cannot be masked or ignored.
5) They have lower priority than any
software interrupt. 5) Software interrupts has more priority
6) It improves throughput of the than any hardware interrupt.
system. 6) They does not improve throughput of
the system.
Differentiate between non-maskable and maskable
interrupt

Non Maskable Interrupt Maskable Interrupt


1) These interrupt can not be 1) These interrupts can be masked
masked or can not made or made pending.
pending . 2) A maskable interrupt cannot
2) Non maskable interrupt disables any non maskable
disables all maskable interrupt.
interrupts. 3) It has lower priority than non
3) It has high priority than maskable interrupts.
maskable interrupts. 4) It may be vactored or non
4) It is always vectored interrupt. vectored interrupt.
5) Response time for non 5) Response time for maskable
maskable interrupt is low interrupts is high.
6) It is used for emergency 6) It is used to interface peripheral
purpose like power failure, devices.
smoke detector.
Flag

The flag register of 8085 microprocessor


contains the data 45H . Interpret its
meaning.
binary form of 45H  0100 0101
S Z X Ac X P X Cy

0 1 0 0 0 1 0 1
Flag

Sign flag Here, Sign flag is reset , this means that result
is positive.
Zero Flag Zero flag is set , this means that result is
equal to zero after the execution of arithmetic or logical
operation .
Auxiliary carry flag Ac is reset , this means that there is
no Auxiliary carry i.e. carry from bit A3 to A4 during
arithmetic operation.
Parity flag parity flag is set means the result stored in
accumulator contains even parity i.e. the result contains
even number of 1’s.
Carry flag carry flag is set, this means there is a carry
from MSB during the execution of arithmetic operation.
Flag

Q.The flag resister of 8085 microprocessor


contains the data 95H. interpret its meaning .
Q. Explain the sign and parity flags of 8085
microprocessor with suitable example.

You might also like