8086 Interfacing
8086 Interfacing
• Same as 8085 when EPROM is used for program memory and RAM is used
for data the space is shared between those two.
1k 10
2k 11
4k 12
8k 13Slide 13: Absolute
addressing
16k 14Slide 15: Linear Decoding
32k 15
64k 16
128k 17
256k 18
512k 19
1 MB 20
Memory interface requirements
• Select the chip
• Identify the register
• Enable the appropriate buffer.
• μp system includes memory and I/O devices
• μp can communicate with only one device1
• So decoding needed to communicate with memory and I/O
• So each device can be accessed independently.
• Three type of decoding:
• Absolute
• Linear
• block
2732 (4k x 8 ) EPROM
Pin Function
PGM*/P* Program
NC Not connected
Block diagram of 2764 UV EPROM
6116 CMOS RAM (2k x 8)
Pin Function
• The memory chip is selected only for the specified logic level on
address lines; no other logic level can select the chip as shown below.
• Two 8K EPROMs (2764) are used to provide even and odd memory
banks (16 bits).
• Control signals BHE and A0 are used to enable O/P of odd and even
memory banks.
• In small system, H/W can be eliminated by using the required addressing lines 1.
• The figure below shows the addressing of 16K RAM (6264) with linear decoding
All higher lines are decoded Few higher address lines are decoded
CHIPS A19 A18 A17 A16 A15 A14 A13 A12 A11 A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0 ADDRESS
1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 FE000H
EPROM
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 FFFFFH
0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1E000H
RAM
0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1FFFFH
8086 16 20
8088 8 20
Example
• 64 KB EPROM
• 64 KB RAM
Sol: 8086 is 16 bit μp so it is necessary to have odd and even memory banks.
ADDRES
CHIPS BHE A19 A18 A17 A16 A15 A14 A13 A12 A11 A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
S
EVEN 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 F0000H
EPROM 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 FFFFEH
ODD 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 F0001H
EPROM 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 FFFFFH
0
EVEN 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 30000H
RAM 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 3FFFEH
ODD 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 30001H
RAM 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 3FFFFH
Design an 8086 based system with the following specifications:
64 KB EPROM
64 KB RAM
Sol: 8086 is 16 bit μp so it is necessary to have odd and even memory banks.