Professional Documents
Culture Documents
Chapter 5 Memory and Memory Interface
Chapter 5 Memory and Memory Interface
Memory interface
8086 Architecture
Assembly language
and Programming
Data Bus
Address Bus
Control Bus
Objectives
• Memory devices and its classification
• Memory architecture
• Pin Function for SRAM and EPROM
• Memory Interface and Applications
• Cache memory
Key terms
• Address decoder 地址译码器
• Backup mass storage system 海量备份存储系统
• Bidirectional bus 双向总线
• Chip Enabled (CE) 芯片启动
• Electrically Erasable Read-Only Memory(EEPROM) 电可擦除 ROM
• Erasable Programmable Read-Only Memory (EPROM) 可擦除可编程的
ROM
• Flash disk 闪存盘
• Flash memory EPROM 闪存 EPROM
• Floppy disk 软盘
• Memory Interface 存储器接口
• Magnetic disk 磁盘
• Nonvolatile 非易失性
• Output Enable ( OE ) 输出允许
• Programmable Read-Only Memory ( PROM ) 可编程 ROM
• Write Enable ( WE ) 写入允许
5.1 INTRODUCTION
Typical BUS Interface
Multilayer storage network
Register
Cache
Memory
Disc Memory
• Address input
• Control input
• Data input/output
Control Input
• CE: Chip enable, logic 0 enable devices used.
Control bus
CE: chip enable, logic 0 for device to be
active
OE: output enable, logic 0 for output data
Standard EPROM devices
EPROM Density (bits) Capacity (bytes)
2716 16K 2Kx8
2732 32K 4Kx8
27C64 64K 8Kx8
27C128 128K 16Kx8
27C256 256K 32Kx8
27C512 512K 64Kx8
27C010 1M 128Kx8
27C020 2M 256Kx8
27C040 4M 512Kx8
696-3184 8M 8Mx1
714-7632 16M 2Mx8
EPROM(cont.)
• Erase all data by UV shining from quartz circle
window on the top of chip.
• Program by special programmer.
• An light tight seal should be stick on window after
program
• Each unit storing data is set to 1.
• Program is inputting 0 to some units.
5.4 MEMORY INTERFACE AND
APPLICATIONS
Main contents:
SRAM 、 EPROM link to CPU
Decoder method are applicable to I/O ports also.
Working mode
• Minmode: System includes only one
microprocessor, all the control signals are
generated by 8086 CPU.
DATA
DIR
G*
Transceiver
(2)
A0-A9 D0-D7 WE*OE A0-A9 D0-D7 OE*
Chip
2142RAM(4) 2716-EPROM(2) Select
(2) (2) Logic
1K X 8 1K X 8 2K X 8 2K X 8
CSY CSX
2
Maxmode 8086 Microcomputer system
Vcc
CLK MRDC* MEMR*
8284A CLOCK MN/MX* GND MWTC* MEMW*
CLK S0 * AMWC
Generator S0* 8288 N.C.
READY S * *IORC*
RES* S 1* IOR*
Bus
1
RESET S* 2 S2* IOWC* IOW*
DENcontrollerAIOWC* N.C.
GND DT/R*
ALE INTA* INTA*
8086 Address
STB
CPU
GND
OE*
AD0-AD7 ADDR/DATA Latches
A8-A19
T Data
Vcc OE*
Transceiver
(2)
A0-A9 D0-D7 WE*OD A0-A9 D0-D7 OE*
Chip
2142RAM(4 2716-2PROM(2) Select
(2)
) (2) Logic
1K X 8 1K X 8 2K X 8 2K X 8
CSY CSX
2
ROM Interface
5.4.1 Memory selection
• Decoding : Decode an special input code to an
unique effective output.
• Gate circuit can be used as decoding circuit.
• Integrated decoder is widely used.
– 2:4 decoder : 74LS139
– 3:8 decoder : 74LS138
– 4:16 decoder : 74LS154
74LS138 3-line to 8-line decoder
Input Output
A 0 Enable Select
1 G2 G2 G1 C B A 0 1 2 3 4 5 6 7
B B
2 A
C 3 1 X X X X X 1 1 1 1 1 1 1 1
4 X 1 X X X X 1 1 1 1 1 1 1 1
G2A 5 X X 0 X X X 1 1 1 1 1 1 1 1
6
G2B 7
0 0 1 0 0 0 0 1 1 1 1 1 1 1
G1 0 0 1 0 0 1 1 0 1 1 1 1 1 1
0 0 1 0 1 0 1 1 0 1 1 1 1 1
Useful decoders: 0 0 1 0 1 1 1 1 1 0 1 1 1 1
0 0 1 1 0 0 1 1 1 1 0 1 1 1
74LS139 2 to 4 decoder
0 0 1 1 0 1 1 1 1 1 1 0 1 1
74LS138 3 to 8 decoder
0 0 1 1 1 0 1 1 1 1 1 1 0 1
74LS154 4 to 16 decoder 0 0 1 1 1 1 1 1 1 1 1 1 1 0
(1)Fully decoded
8KB 8KB
RAM EPROM
CS* CS*
A13
Partial Address decoding
• Not all the address lines need to be used (A14—A19 not used).
so FFFF0,3BFF0,07FF0 pr C3FF0 get the same data.
• (+) the purpose is get the job done in minimum hardware.
• (-)Feature expansion of the memory is impossible, and may cause
invalid data reads due to overlapping memory segment reads(a fatal
error).
A0-A12
8KB 8KB
RAM EPROM
CS* CS*
A13
A19 A18 A17 A16 A15 A14 A13 A12 A11 A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 0 0 1 1 0 0 0 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 1
2732 :
32Kbit EPROM
(8K×8)
Read/Write Control