8085 Microprocessor Architecture

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 44

8085 Microprocessor

Architecture

1
8085 Microprocessor Architecture

• 8-bit general purpose μp


• Capable of addressing 64 k of memory
• Has 40 pins
• Requires +5 v power supply
• Can operate with 3 MHz clock

2
3
Operation of 8085 microprocessor
• It performance four different operations
– Memory read

– Memory write

– Input/output read

– Input/output write

4
• For proper communications
– Address bus

– Data bus

– Control bus

5
6
Memory read operation
• Microprocessor place 16 bit address in to the
address bus
• Decoding the address bus for identifying the
memory address of data
• Microprocessor sends MEMR controls signal
enable the memory IC
• Data of memory location is placed in data bus
and microprocessor

7
8
9
Data flow from memory to microprocessor

• The 16 bit memory address is stored into


program counter

• Program counter sends the 16 bit address on


the address bus

• Memory address decoder is decoded and


identified the specified memory location
10
• The control unit sends the control signal RD in
the next clock cycle and the memory IC is enabled

• RD is active for two clock periods.

• When the memory IC is enabled, the byte from the


memory location is placed on the data bus AD7 –
AD0. after that data is transferred to the
microprocessor.
11
Arithmetic and logic unit (ALU)
• It consists of
– Accumulator (A)

– Temporary Register (TR)

– Flag Register (FR)

– Arithmetic and logic unit (ALU)

12
13
• The temporary register is not accessible by the
user.
• So, it cannot read by the user.
• The ALU always operate with one or two
operand.
• Operands are available in general purpose
register or memory.
• Final results will stored in the accumulator.

14
Sequence of operations of ALU
• One operand is in the A register
• The other operand may be in general purpose
register or memory location, which will be
transferred to the temporary register.
• Contents of the accumulator and temporary
registers are considered as inputs of ALU.
• The results of ALU operation is transferred in the
A register through internal data bus.
• The content of the FLAG registers change
depending on the result.
15
ALU performs the following operations
• Addition
• Subtraction
• Logical AND
• Logical OR
• Logical Ex-OR
• Complement
• Increment by 1
• Decrement by 1
• Rotate left, rotate right
• Clear

16
Timing and control unit
•Control unit control the operations of different
units while the CPU generates timing sequence
signals for executions of instruction.
•This unit control the data flow between CPU to
memory and CPU to peripherals devices.
•It controls the entire operations of
microprocessors.
•Timing and control unit act as the brain of the
microprocessor

17
Registers
• It has six general purpose registers
– B, C, D, E, H and L

• Two registers combined form register pair and


stored 16 bit data
– BC, DE and HL

• Accumulator, Flag register

18
• Two more 16 bit
registers
– Stack pointer (SP)
– Program counter (PC)
• Instruction register
• Program status word
register

19
Accumulator
• 8 bit register
• It is part of arithmetic and logic unit
• Identified as A or ACC
• Used stored 8 bit data and perform arithmetic
and logic operations
• The final results will be stored in this register
after Arithmetic and logic operation

20
General purpose registers
• B, C, D, E, H and L
• Register used to store 8 bit operand
• To hold 16 bit data or 16 bit memory address, two
8 bit registers can be combined. It is known as
register pair (BC, DE and HL).
• HL pair is used as the address of memory location
• BC and DE are used to store the 16 bit data.
• It can be accessed by programmer during
execution

21
Special purpose register
• Program counter (PC)
• Stack pointer (SP)
• Flag/ status register (FR or SR)
• Instruction register (IR)
• Memory address register (MAR)
• Temporary register

22
Program counter (PC)
• 16 bit special purpose register
• It is hold the memory address of the next
instruction which will be executed.
• This register keep track of memory location of
the instruction during execution of program.
• Microprocessor increment the program
counter after execution of each instruction

23
Stack pointer (SP)
• 16 bit special purpose register
• The stack is a sequence of memory location in
the R/W memory.
• Starting of the stack is defined by 16 bit address
into the stack pointer.
• Programmers use this register to store or retrieve
the contents of the accumulator, flag register,
program counter during execution of program

24
Flags/ status register
• ALU includes five flips, which are set or reset
after an ALU operation according to content of
accumulator and other general purpose
register.
• Status of each flip flops known as flag
• Five flags
– Carry flag (CY), Parity flag (PY), Auxiliary Carry flag
(AC), Zero flag (Z) and Sign flag (S)

25
26
Carry flag
• Arithmetic operation generates carry in case
of addition or a borrow in case of subtraction.

• After execution, carry flag is set to 1.

• position of the carry flag is D0

27
Parity flag
• After arithmetic or logical operation,
– If number of 1s in the results is even then it is
even parity, then parity flag set to 1.
– If number of 1s in the results is odd then it is odd
parity, then parity flag set to 0.

• Position of the parity flag is D2

28
Auxiliary carry flag
• In arithmetic operation, if carry generated by
bit D3 and passed on D4, then auxiliary carry
flag is set.

• This flag is used to internal binary coded


decimal operations (BCD).

• The position of this flag is D4

29
Zero flag
• When 8 bit ALU operation results is zero, then
zero flag is set.

• This flag affected by accumulator and general


purpose register

• Position of the flag is D6

30
Sign flag
• Sign flag has importance only on signed arithmetic
operation
• MSB of the 8 bit data is the sign bit.
– When a number is negative, it is 1
– When a number is positive, it is 0
• For signed operation, remaining 7 bits are used for
represent the magnitude of a number
• After execution of signed arithmetic, MSB of the results
also used represents the sign.
• Position of sign flag is D7

31
Program status word (PSW)
• In a flag register five bits (D0, D2, D4, D6, D7)
indicate status and three bits (D5, D3, D1) is
undefined

• Combination of these 8 bits known as Program


Status Word (PSW)

32
• Determine the status of flag after addition of
07H and CFH

33
• Determine the status flag after addition of CEH
and 9BH

34
Instruction register (IR)
• The instruction registers holds the operation code
(opcode) of the current instruction of a program
during arithmetic and logical operation.
• The instruction is fetched from the memory prior
to execution.
• The decoder takes the instruction and decodes.
• After that, decoded instruction pass to the next
stage for execution

35
Memory address register (MAR)
• The memory address register hold address of
the next program instruction.

• Then MAR feeds the address bus with


addresses of the memory location of the
program instruction which will be executed.

36
Temporary register (TR)
• 8 bit register
• Associated with ALU
• This register hold data during arithmetic and
logical operation
• This register used by the microprocessor but is
not accessible to the programmer

37
System bus

38
Address bus
• It consists of 16 wires
therefore address bus has 16
2 16  65536
bit.
• Total size is 64 kB.
0000 0000 0000 0000
• Each location store 1 byte
.
data.
.
• Address bus is unidirectional .
bus. 1111 1111 1111 1111

39
40
41
Data bus
• It is used to move or transfer data in binary
form.
• Data size of the data bus is 8 bit.
• Data bus consists of 8 wires. Hence, 28
combination of binary digits are possible.
• this bus is bidirectional bus,

42
Control bus
• This bus coordinating and controlling
microprocessor operations.
• RD/WR line is a control signal,
– RD =0, memory and other input output devices
are read.
– WR = 0, data can be written in memory and any
other devices.
• S0,S1, IO/M, RD, WR, ALE, READY, HOLD, HLDA,
• RESETIN and RESET OUT.
• Control bus is partially unidirectional and
partially bidirectional.
43
44

You might also like