8085 Microprocessor Architecture Guide
8085 Microprocessor Architecture Guide
Contents Page
PART ONE
Introduction-
8085
Introduction
It is a single chip N MOS device with 40 pins. 8085 It is an 8-bit microprocessor designed by Intel in 1977
It has multiplexed address and data bus.(AD0 - AD7). 8 bit General purpose microprocessor (i.e. 8 bit data bus).
Introduction
It provides accumulator, 5 flag register, 6 general purpose The maximum clock frequency is 3MHz while minimum
registers and 2 special purpose registers (SP,PC). frequency is 500kHz.
PART TWO
Programing model
Accumulator A (8) Flag Register
D (8) E (8)
H (8) L (8)
Address Bus 16
8 Data Bus
Bidirectional Unidirectional
Accumulator A (8) Flag Register
B (8) C (8)
D (8) E (8)
H (8) L (8)
B (8) C (8)
D (8) E (8)
H (8) L (8)
B (8) C (8)
D (8) E (8)
H (8) L (8)
16 Address Bus
Data Bus 8 • Used as memory pointer.
• Points to the memory location in R/W memory, called Stack.
• Beginning of stack is defined by loading a 16-bit address in
the stack pointer.
Bidirectional Unidirectional
Accumulator A (8) Flag Register
B (8) C (8)
D (8) E (8)
H (8) L (8)
B (8) C (8)
D (8) E (8)
H (8) L (8)
S Z AC P CY
1 0 1 1 1 1 1 0
1 1 1
S=1
0 0 1 0 1 0 1 0
+ 0 1 1 0 1 0 0 1
Z -Zero Flag P -Parity Flag 1 0 0 1 0 0 1 1
S -Sign Flag
Set (1) when result is zero; Set (1) if result has
evenACno.
= 1of 1’s & Reset(0) if
(1) if 7th bit
Setotherwise of result is 1;
reset(0) result has odd no. ofCY1’s-Carry Flag
otherwise resetAC (0)-Auxiliary Carry Flag Set (1) if arithmetic operation results in carry;
:Undefined otherwise Reset(0)
Set (1) when carry bit is
generated by 3rd bit & passed
1 0 1 0 0 0 1 1 1 1 1
1 0 1 0 to bit 4th bit. otherwise
P=1 1 0 1 0 1 1 1 1
-1 0 1 0 Reset(0) + 0 1 1 0 1 0 0 0
0 0 0 0
1 0 0 0 1 0 1 1 1
Z=1
CY = 1
Accumulator A (8) Flag Register
D (8) E (8)
H (8) L (8)
Address Bus 16
8 Data Bus
Bidirectional Unidirectional
3
PART THREE
Bus Organization
CPU Memory Input/output
Control Bus
System Bus
Address Bus
Data Bus
A15
Address Bus
A0
D7
Data Bus
D0
Control Bus
A15
Address Bus
A0
Control Bus
A15 • Group of 8 lines identified as D0 to D7.
• They are bidirectional i.e. data Address Bus directions between microprocessor,
flow in both
A0
memory & peripheral.
• The data bus connects the I/O ports & CPU. So that CPU can write data to or read
data from the memory or I/O ports.
D7
Data Bus
D0
• 8 data lines enable microprocessor to manipulate data ranging from 00H to FFH
(28=256 numbers).
Control Bus
• As Data bus is of 8-bit, 8085 is known as 8-bit Microprocessor.
A15 • It comprises of various single lines that carry synchronization, timing & control
Address Bus
A0 signals.
• These signals are used to identify a device type with which MPU intends to
communicate.
• Some control signals are Read, Write and Opcode fetch etc.
D7
Data Bus
D0
Control Bus
A15
Address Bus
A0
D7
Data Bus
D0
Control Bus
4
PART FOUR
Pin Diagram
X1 1 40 VCC
S1 S0 RST7.5
Operation 7 34 IO/M
RST6.5 8 33 S1
0 0 HLT
RST5.5 9 32 RD
INTR 10 31 WR
0 1 WRITE 8085A
INTA 11 30 ALE
1 0 READ
AD0 12 29 S0
AD1 13 28 A15
1 1 OPCODE FATCH
AD2 14 27 A14
AD3 15 26 A13
AD4 16 25 A12
AD5 17 24 A11
AD6 18 23 A10
AD7 19 22 A9
VSS 20 21 A8
X1 1 40 VCC
I0/M RD WR Operation
0 0 0 HLT
0 0 1 MEMR
0 1 0 MEMW
0 1 1 Opcode
Fetch
1 0 0 HLT
1 0 1 IOR
1 1 0 IOW
1 1 1 NA
X1 1 40 VCC
• RST7.5 is
When the signal on this pin goes low, the Program Counter 7 34 IO/M
set to zero, the buses are tri-stated & microprocessorRST6.5
is 8 33 S1
reset. RST5.5 9 32 RD
INTR 10 31 WR
INTA 11 8085A 30 ALE
RESET OUT → Output
AD0 12 29 S0
PART FIVE
Functional Block
Diagram
INTA RST6.5 TRAP
INTR RST5.5 RST7.5 SID SOD
Instructio
Accumulator (8) Temp. Reg. (8) Multiplexer
n Reg. (8)
W (8) Z (8)
Temp. Reg. Temp. Reg.
Instruction B (8) C (8)
Decoder Reg. Reg.
Flag (5) and
Register Select
D (8) E (8)
Flip-Flops Machine Reg. Reg.
Cycle H (8) L (8)
Encoding Reg. Reg.
Arithmetic Stack Pointer (16)
Logic Unit
Power +5 V (ALU) (8) Program Counter (16)
Supply GND
Increment/Decrement
Address Latch (16)
X1 CLK Reset
X2 GEN
Timing and Control
Control Status DMA Address Buffer Data/Address Buffer
(8) (8)
Instructio
Accumulator (8) Temp. Reg. (8) When Instruction is fetched from memory,
n Reg. (8)
it is loaded in the Instruction Register (IR).
Instruction
Decoder
Flag (5) and
Flip-Flops Machine
Cycle
S Z AC P CY
Encoding
Arithmetic
Instruction decoder decodes the
Logic Unit
Power +5 V information present in the Instruction
(ALU) (8)
Supply GND register.
Register Select
• They are used internally, so they are not available to the D (8) E (8)
programmer. Reg. Reg.
H (8) L (8)
Reg. Reg.
16-bit register used to store the memory address location of the next
instruction to be executed. Stack Pointer (16)
Perform synchronization with peripheral device. Shows read/write status to/from memory or I/O.
This unit synchronizes all the microprocessor operations with the clock and generates control signal necessary for
communication between microprocessor & peripheral.
Instructio
Accumulator (8) Temp. Reg. (8) Multiplexer
n Reg. (8)
W (8) Z (8)
Temp. Reg. Temp. Reg.
Instruction B (8) C (8)
Decoder Reg. Reg.
Flag (5) and
Register Select
D (8) E (8)
Flip-Flops Machine Reg. Reg.
Cycle H (8) L (8)
Encoding Reg. Reg.
Arithmetic Stack Pointer (16)
Logic Unit
Power +5 V (ALU) (8) Program Counter (16)
Supply GND
Increment/Decrement
Address Latch (16)
X1 CLK Reset
X2 GEN
Timing and Control
Control Status DMA Address Buffer Data/Address Buffer
(8) (8)
PART SIX
Memory Interfacing
T - States
CLK
These sub divisions are internal states synchronized with system clock & each T-state is precisely equal
to one clock period.
Machine Cycle
Machine Cycle-1
CLK
Opcode Fetch
The basic microprocessor operation such as reading a byte from Memory & I/O port or writing
a byte to memory & I/O port.
T1 T2 T3 T4 T1 T2 T3 T1 T2 T3
CLK
A15
High order Memory address Unspecified
A8
AD7
Low order
Memory address Opcode
AD0
Timing Diagram
Opcode
ALE Fatch
IO/M
RD
CLK
A15
High order Memory address Unspecified
A8
AD7
Low order
Memory address Data from processor
AD0
Timing Diagram
Memory
ALE Write
IO/M
IO/M=0, S1=0 , S0=1
S0
WR
CLK
A15
High order Memory address Unspecified
A8
AD7
Low order
Memory address Data from Memory
AD0
Timing Diagram
Memory
ALE Read
IO/M
IO/M=0, S1=1 , S0=0
S1
RD
CLK
A15
High order Memory address Unspecified
A8
AD7
Low order
Memory address Data from I/O
AD0
Timing Diagram
I/O
ALE Read
S0
IO/M=1, S1=1 , S0=0
IO/M S1
RD
Memory Structure
Data Inputs
N= No of Memory location
WR
M=Word Length Input Buffer
CS
E.g. If a memory is having address lines=10 AN-1
Internal Decoder
data lines=8
then
NXM
1. number of registers / memory locations =
Memory
N= 210 = 1024
2. word length M= 8 bit
Therefore, N X M= 1024 X 8 A0
Output Buffer
RD
Data Output
Memory Structure
Memory size(bytes)(2n) No. of Lines (n)
2 1
4 2
8 3
16 4
32 5
64 6
128 7
256 8
512 9
1024 (1k) 10
2048 (2k) 11
4096 (4k) 12
8192 (8k) 13
16348 (16k) 14
32768 (32k) 15
65536 (64k) 16
Memory Structure
Interface 4kB of EPROM with starting address from 0000H and 2kB of RAM with starting
address followed by EPROM
EPROM
Chip Size = 4kB (i.e. address Line=12, m/m = 212 = 4096B = 4k)
Interface 4kB of EPROM with starting address from 0000H and 2kB of RAM with starting
address followed by EPROM
RAM
Starting address = Ending address of EPROM +1
= 0FFFH+1
= 1000H
Chip Size = 2kB (i.e. address Line=11, m/m = 211 = 2048B = 2k)
EPROM EPROM-1
Chip Size = 8kB Starting address = 0000 H
Total EPROM required = 16kB Chip Size = 8 kB (i.e. address Line=13, m/m = 213 = 8192B = 8k)
Chip required = 16kB/8kB = 2 Ending address = 1FFF H
EPROM-2
Starting address = 1FFF H +1 = 2000 H
Chip Size = 8 kB (i.e. address Line=13, m/m = 213 = 8192B = 8k) = 1FFF H
Ending address = 2000 H + 1FFF H = 3FFF H
RAM
Starting address = EPROM End Address +1 = 3FFF H +1 = 4000 H
Chip Size = 8 kB (i.e. address Line=13, m/m = 213 = 8192B = 8k) = 1FFF H
Ending address = 4000 H + 1FFF H = 5FFF H
0000H 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1FFFH 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1
2000H 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1
3FFFH
4000H 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
RAM
0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1
5FFFH
Y0 000
To EPROM CHIP-1
A15
Y1 001 To EPROM CHIP-2
A14 3:8
Decoder
A13 Y2 010 To RAM
Example-3
Interface 8kB of EPROM and 8kB of RAM using 4kB devices
Example-4
Draw the interfacing of a 4kB EPROM having a starting address 2000H and Two 2kB static RAMs
having starting addresses 6000H and 8000H, respectively, with 8085 microprocessor.
THANK YOU