Microprocessor
Microprocessor
PAPER-II
MICROPROCESSOR
MICROPROCESSOR
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
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
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
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
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
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
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
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
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
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
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