The 8085 microprocessor features a 16-bit address bus (A15−A0). Because each address bit can take the value of 0 or 1, the total number of unique byte addresses generated is:
Every unique address points to an 8-bit (1-byte) storage register in memory or an I/O device.
Memory Chip Capacity and Line Requirements
Semiconductor memory chips are organized as an array of words, where each word is 8 bits (1 byte) wide. To select any individual word inside a chip of size M bytes, the chip requires k address pins, where:
M=2k⟹k=log2(M)
A 2 KB EPROM (e.g., Intel 2716) contains 2048 bytes. It requires k=log2(2048)=11 address lines (A0−A10).
An 8 KB SRAM (e.g., Intel 6264) contains 8192 bytes. It requires k=log2(8192)=13 address lines (A0−A12).
When interfacing a 2 KB chip to the 8085's 16 address lines, the lower 11 lines (A0−A10) connect directly to the memory chip to select internal cells. The remaining higher-order lines (A11−A15) connect to decoding logic to generate the active-low Chip Select (CS) strobe.
Address Decoding Schemes
Two primary decoding techniques are used in microprocessor systems:
Absolute (Full) Decoding: All unused high-order address lines are decoded using logic gates or a decoder IC (such as the 74LS138 3-to-8 decoder). Each memory location has one, and only one, unique address. No shadow or foldback addresses exist.
Partial (Linear) Decoding: Only a subset of higher-order address lines are decoded, or individual address lines are connected directly to chip select inputs. While this saves decoder hardware in small systems, it produces shadow addresses (foldback memory), where the same physical memory cell appears at multiple logical addresses.
Address Decoding with the 74LS138 Decoder
The 74LS138 is a 3-line-to-8-line active-low decoder. It features three enable inputs (G1 active-high, G2A and G2B active-low) and three select inputs (A,B,C):
Inputs A,B,C are tied to address lines A11,A12,A13.
Enable G2A and G2B connect to A14 and A15 through invert/NOR gating.
Output lines Y0 through Y7 go low one at a time to drive the CS pins of up to eight 2 KB memory blocks:
Fig 3.1: Complete Memory Interfacing Scheme using 74LS138 3-to-8 Line Decoder
Decoder Output
Binary Range (A15−A0)
Hexadecimal Address Range
Y0
0000000000000000 to 0000011111111111
0000H−07FFH (2 KB EPROM)
Y1
0000100000000000 to 0000111111111111
0800H−0FFFH (2 KB RAM)
Y2
0001000000000000 to 0001011111111111
1000H−17FFH
Y3
0001100000000000 to 0001111111111111
1800H−1FFFH
74LS138 3-to-8 Address Decoder
8085 Memory Interfacing & Address Space Mapping
Explore how the 3 highest address lines (A15–A13) partition the 64 KB memory space into eight 8 KB slots with zero address collisions.
Presets:
Address Bus Decoding Logic
16-Bit Address (A15–A0):2500H
Bin: 0010010100000000bDec: 9472
Decoder Inputs (C, B, A)
A15(C)=0, A14(B)=0, A13(A)=1
Binary code: 001 (Index 1)
Chip Offset (A12–A0)
0500H
Offset within selected 8 KB IC
74LS138 Output Lines (/Y0 to /Y7)
/Y0
5V
/Y1
0V
/Y2
5V
/Y3
5V
/Y4
5V
/Y5
5V
/Y6
5V
/Y7
5V
64 Kilobyte System Memory Map
8KB EPROM 2764
Select: /Y0 (CBA=000)
0000H
to 1FFFH
8KB SRAM 6264 (Primary RAM)
Select: /Y1 (CBA=001)
2000H
to 3FFFH
8KB SRAM 6264 (Secondary RAM)
Select: /Y2 (CBA=010)
4000H
to 5FFFH
8KB Peripheral Memory Space
Select: /Y3 (CBA=011)
6000H
to 7FFFH
Active Chip: 8KB SRAM 6264 (Primary RAM)
System stack (SP), variables, lookup tables, and user assembly lab program storage.
Physical Pin /CS = 0V (Active) · Offset = 0500H
Memory-Mapped I/O vs. I/O-Mapped I/O
The 8085 supports two distinct architectures for communicating with peripheral interface devices:
Feature
Memory-Mapped I/O
I/O-Mapped I/O (Peripheral-Mapped)
Address Bus Width
16-bit address (A15−A0)
8-bit address (A7−A0 duplicated on A15−A8)
Maximum Devices
Shared with 64 KB memory space
28=256 input ports and 256 output ports
Control Signals
MEMR and MEMW
IOR and IOW (qualified by IO/M=1)
Instructions Used
Any memory instruction: MOV, LDA, STA, ADD M
Dedicated instructions only: IN port and OUT port
Data Transfer
Between any register and device
Exclusively through Accumulator (A)
Execution Cycles
Typically 10 to 13 clock states
Strictly 10 clock states (3 machine cycles)
Hardware Cost
More decoding gates (16 lines)
Fewer decoding gates (8 lines)
Design Case Study: Interfacing 1 KB EPROM and 2 KB RAM to 8085
A complete memory subsystem requires interfacing both non-volatile program memory (EPROM) and volatile data memory (SRAM) to the demultiplexed system bus.
1. Specifications and Address Allocation
1 KB EPROM (2708/2716): Memory range allocated: 2000H−23FFH.
Capacity: 1024×8 bits=210 bytes.
Address lines required for internal selection: 10 lines (A9−A0).
Address lines available for chip selection (CS): 6 lines (A15−A10).
2 KB RAM (6116): Memory range allocated: 0000H−07FFH.
Capacity: 2048×8 bits=211 bytes.
Address lines required for internal selection: 11 lines (A10−A0).
Address lines available for chip selection (CS): 5 lines (A15−A11).
2. Memory Address Map and Decoding Truth Table
Device
A15
A14
A13
A12
A11
A10
A9
A8
A7
A6
A5
A4
A3
A2
A1
A0
RAM Start (0000H)
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
RAM End (07FFH)
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
EPROM Start (2000H)
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
EPROM End (23FFH)
0
0
1
0
0
0
1
1
1
1
1
1
1
1
1
1
3. Chip Select Boolean Logic
For the 2 KB RAM, active when A15=0,A14=0,A13=0,A12=0,A11=0.
CSRAM=A15+A14+A13+A12+A11
For the 1 KB EPROM, active when A15=0,A14=0,A13=1,A12=0,A11=0,A10=0.
CSEPROM=A15+A14+A13+A12+A11+A10
4. Bus Demultiplexing and Control Signal Generation
74LS373 Octal Latch: Inputs 1D−8D connect to AD7−AD0. The latch enable (G) connects to ALE. When ALE is high, AD7−AD0 contains address information; on the falling edge of ALE, lines A7−A0 are latched for the remainder of the machine cycle.