Professional Documents
Culture Documents
Contents
Pin diagram of 8085
8085 Operations
Architecture of 8085 8085 Communication with Memory
A 40-pin IC
Six groups of signals Address Bus Data Bus Control and Status pins Power Supply & frequency signals Externally initiated Signals Serial I/O ports
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
X1 X2 RST-OT SOD SID TRAP RST 7.5 RST 6.5 RST 5.5 INTR INTA AD0 AD1 AD2 AD3 AD4 AD5 AD6 AD7 VSS
VCC HOLD HLDA CLKO RST-IN READY IO/M S1 RD WR ALE S0 A15 A14 A13 A12 A11 A10 A9 A8
40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21
8085
ALE WR RD IO/M S0 S1
30 31 32 34 29 33
Address Bus
Data Bus
1 2
X1 X2
AD0 AD1 AD2 AD3 AD4 AD5 AD6 AD7 A8 A9 A10 A11 A12 A13 A14 A15
12 13 14 15 16 17 18 19 21 22 23 24 25 26 27 28
8085 Operations
Microprocessor Initiated Operations
Internal Operations
Peripheral/Externally Initiated Operations
Memory Write
I/O Read I/O Write
Internal Operations
Store 8-bit data
execution
Interrupt
Ready Hold
Architecture of 8085
Power Supply a +5V DC power supply
Architecture of 8085
Registers Program Status word Program Counter Stack Pointer Instruction Register and Decoder
8085 has 8-bit ALU Performs arithmetic & Logic operations on data
Generates timing and control signals
Accumulator and Flag Register can be combined as a register pair called PSW Instruction fetched from memory is stored in Instruction register (8-bit register) Decoder decodes the instruction and directs the Timing & Control Unit accordingly
INTR general purpose interrupt RST 5.5 Restart Interrupts RST 6.5 RST 7.5 TRAP non-maskable interrupt
8085 has two signals for serial communication SID Serial Input Data SOD Serial Output Data
A15 A14 A13 A12 A11 A10 A9 A8 AD7 AD6 AD5 AD4 AD3 AD2 AD1 AD0
Data Bus
Data Bus Used to transfer instructions and data 8085 has a 8-bit data bus
Identify the memory location (with address) Generate Timing & Control signals Data transfer takes place
3 2
Timing Diagram
address lines, (AD0 to AD7) & (A8 to A15) 8085 performs data transfer using its data lines, AD0 to AD7 Lower order address bus & Data bus are multiplexed on same lines i.e. AD0 to AD7. Demultiplexing refers to separating Address & Data signals for read/write operations
A8-A15
20H
AD0-AD7 8085
05H
Memory
4FH 2005H
must be applied to the memory chip for the whole duration of the memory read/write operation. Lower-order address needs to be saved before microprocessor uses it for data transfer
8085
Data
Memory
Data
Memory
Interface
Chip
Control
Control
74LS373
Memory
A0 A7
8085
Chip
A8-A15
Control
Memory Interface
74LS373
Program
A0 A7
8085
AD0-AD7 ALE
Memory
CS RD
A8-A15
IO/M RD
A8-A15
Memory Interface
U3 U1 36 1 2 5 6 9 8 7 10 11 29 33 39 35 38 4 37 3 RST-IN X1 X2 SID TRAP RST 5.5 RST 6.5 RST 7.5 INTR INTA S0 S1 HOLD READY HLDA SOD CLKO RST-OT 8085 AD0 AD1 AD2 AD3 AD4 AD5 AD6 AD7 ALE A8 A9 A10 A11 A12 A13 A14 A15 IO/M RD 12 13 14 15 16 17 18 19 30 21 22 23 24 25 26 27 28 34 32 3 4 7 8 13 14 17 18 11 U2 D0 D1 D2 D3 D4 D5 D6 D7 G Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7 OC 2 5 6 9 12 15 16 19 1 10 9 8 7 6 5 4 3 A0 A1 A2 A3 A4 A5 A6 A7 O0 O1 O2 O3 O4 O5 O6 O7 11 12 13 15 16 17 18 19
31
WR
27C512A
Memory Mapping
8085 has 16-bit Address Bus
the range of addresses 0000H FFFFH The range of addresses allocated to a memory device is known as its memory map
A15 is connected
U1 36 1 2 5 6 9 8 7 10 11 29 33 39 35 38 4 37 3 RST-IN X1 X2 SID TRAP RST 5.5 RST 6.5 RST 7.5 INTR INTA S0 S1 HOLD READY HLDA SOD CLKO RST-OT 8085 AD0 AD1 AD2 AD3 AD4 AD5 AD6 AD7 ALE A8 A9 A10 A11 A12 A13 A14 A15 IO/M
WR
U2 12 13 14 15 16 17 18 19 30 21 22 23 24 25 26 27 28 1 34 2 32 74LS32 22 1 U5A 3 3 4 7 8 13 14 17 18 11 D0 D1 D2 D3 D4 D5 D6 D7 G Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7 OC 2 5 6 9 12 15 16 19 1 10 9 8 7 6 5 4 3
U4 A0 A1 A2 A3 A4 A5 A6 A7 O0 O1 O2 O3 O4 O5 O6 O7 11 12 13 15 16 17 18 19
RD
31
= 0000H to
A11 to A0
1. 111
= 7FFFH
System Bus
8085
Memory Interface Memory Devices
Peripheral-mapped I/O
Memory-mapped I/O
8085 uses its 16-bit address bus to identify a
memory location Memory address space: 0000H to FFFFH 8085 needs to identify I/O devices also I/O devices can be interfaced using addresses from memory space 8085 treats such an I/O device as a memory location This is called Memory-mapped I/O
Peripheral-mapped I/O
8085 has a separate 8-bit addressing scheme
for I/O devices I/O address space: 00H to FFH This is called Peripheral-mapped I/O or I/O-mapped I/O
Identify the I/O device (with address) 2. Generate Timing & Control signals 3. Data transfer takes place
1.
Reading Input: IO/M = 0, RD = 0 Write to Output: IO/M = 0, WR = 0 Reading Input: IO/M = 1, RD = 0 Write to Output: IO/M = 1, WR = 0
Peripheral-mapped I/O
Identify the I/O device (with address) Generate Timing & Control signals Data transfer takes place
Inputs data from input device into the accumulator It is a 2-byte instruction Format: IN 8-bit port address Example: IN 01H
OUT Instruction
Outputs the contents of accumulator to an output device It is a 2-byte instruction Format: OUT 8-bit port address Example: OUT 02H
address 01H) and display it on ASCII display connected to output port (port address 02H) IN 01H ;reads data value 03H (example)into ;accumulator, A = 03H MVI B, 30H;loads register B with 30H ADD B ;A = 33H, ASCII code for 3 OUT 02H ;display 3 on ASCII display
were one of the memory locations Memory related instructions are used For e.g. LDA, STA LDA 8000H
Loads A with data read from input device with 16-bit address 8000H
STA 8001H Stores (Outputs) contents of A to output device with 16-bit address 8001H
address 8000H) and display it on ASCII display connected to output port (port address 8001H) LDA 8000H;reads data value 03H (example)into ;accumulator, A = 03H MVI B, 30H;loads register B with 30H ADD B ;A = 33H, ASCII code for 3 STA 8001H;display 3 on ASCII display