Chap 5
Chap 5
Chap 5
Devices like floppy-disk drive are referred to as secondary storage device. The data from
secondary storage device is read byte by byte from the sane (I/O port) address.thi s means
that to the CPU, each byte of data on the disk appears to be stored at the same address.
Field-programmable ROMs There are several types of ROMs that can be programmed
by the user in the field. These devices are referred to as programmable read-only
memories (PROMs).
Fusible-link PROMs one type PROM uses a low current fusible link in series with the
output. By applying a current pulse to the desired output, the fuse can be melted and a
logic 1 or 0 permanently programmed. A typical application would be a “boot” PROM in
microcomputer system.
EPROMs use a floating-gate avalanche injection MOS (FAMOS) transistor cell to store
charge. Applying a special programming voltage (Vpp) causes a high electric field to be
developed in the channel region of the transistor. This in turn causes electrons to jump the
silicon dioxide barrier between the channel region and the floating gate.
71
During programming the select gate is given a positive bias which helps attract these
electrons to the floating-gate electrode. Because the floating gate is surrounded by silicon
dioxide (an excellent insulator), the injected charge is effectively trapped.
Cells with trapped charge cause the transistor to be biased ON, where as those cells
without trapped charge are biased OFF. Blank EPROMs have no charge and each cell
stores a logic 1. The EPROM can be erased by subjecting each to ultraviolet (UV) light,
which has a wave length of 2537 angstroms. The electrons on the floating gate absorb
photons from the UV-light source and acquire enough energy to reverse the programming
process and return to the substrate.
EPROMs are packaged in special ceramic packages with quartz windows to allow
erasure. In operation the EPROM window should be covered with an opaque label
because normal room fluorescent lighting could erase the device.
Because of these problems the EEPROM is developed. This device can be programmed
and erased without removing the chip from its socket. In addition, both byte and bulk
erasure modes are possible.
Some applications of EEPROM are , although it will not replace conventional RAM, it
can be used to hold programs and data that are that are subject to frequent changes: for
example, inventory records, set points for NC (numerical controlled) machine tools, and
motion paths for industrial robots.
Static and dynamic RAMs Two types of semiconductor RAM are popular. In static
RAM four to six transistors are connected to form a simple RS flip-flop. In a static RAM,
data, once entered, remain valid as long as the power supply is not turned off.
On the other hand, to retain data in a DRAM, in addition to power supply, a periodic
refreshing with in specific interval of time is required, because the elements are made of
capacitive. Because of the refresh and address multiplexing requirements, interfacing a
72
DRAM to a microprocessor is more complex than SARM interface. However, DRAM
controller chips are available to simplify this task.
The one basic characteristic of all 8086 memory designs is the requirement to partition
the memory in to two banks. One bank stores the even-addressed bytes and the other the
control signal must be used in the
odd-addressed bytes. The A0 address line and BHE
memory interface to select the appropriate bank as required by the current CPU
instruction.
Data connections Data connections are the points at which data are entered for storage or
extracted for reading. Most devices are 8-bits (a byte) wide memory.
73
Chip select ( input is active
) Chip select Selects or enables the memory device. If CS
(a logic 0), the memory device performs a read or write operation; if it is inactive (a
logic-1) the memory device cannot perform a read or write operation because it is turned
off or disabled.
Control connection A ROM usually has only one control input, output enabled (OE )
connection, which allows data to flow out of the output data pins of the ROM. A RAM
memory device has either one or two control inputs:
i) R/W or
ii) WE and
OE (write and output enabled)
A13-address lines are required to access all of the 8K-bytes. AB1–AB13 address lines are
connected to the memory chip address lines A0–A12. You must remember that AB0 and
74
are required to select the appropriate bank. Thus the interface provides a total of
BHE
16Kbytes of memory.
The memory idles with all data pins open-circuited until the
CS input is taken low. When
CS is low, a read cycle will occur provided that WE is high (disabled) and
OE is low (then
used to enable the output buffers).
For even byte transfer only AB0 will be low and memory-A is selected. For odd byte
transfer memory-b will be selected and WE and
BHEB only will be low. Note that OE are
driven by MEMW and MEMR which are generated from BHE, WR, and A0 pins of the
microprocessor as shown in the figure below.
BHE (MEMW
HWR )
WR
AO (MEMW
LWR )
The address decoder must decode the unused address lines AB0–AB19. Figure below
shows one possibility. This circuit forces the unused address lines to be 111111B and
maps the circuit to the range FC000 – FFFFFH
AB14
AB15
AB16
MEMORY SELECT
AB17
AB18 This line is low for any address
AB19 between FC000 - FFFFFH
75
5.3 ADDRESS DECODING TECHNIQUES
The 8086 microprocessor provides a 20 bit memory address that allows up to 1MB of
main memory. Most memory interface, however, do not fill this entire range. This means
that for a given memory design, several of the address lines are going to be “unused”.
However, these unused lines are very important because they determine the range of the
address the memory interface will occupy.
An address decoder is a circuit that examines these extra address lines and enables the
memory for a special range of addresses. This is an important part of any memory design,
as one block of memory must not be allowed to overlap another. The decoder ranges
from simple NAND gates to programmable array logic (PAL) devices.
76
Figure 5.6 the 74LS138 3-to-8 line decoder connected to memory
The 74LS138 3-to-8 line decoder can be used to provide eight consecutive memory-block
select signals. A 256 KB memory array is shown in the figure 5.6. It consists of four
64Kbyte blocks of memory and a 74LS138, 3 to 8 line decoder. The low order address
lines AB1–AB16 select one of 64KB in each memory bank.
The decoder allows only one bank to be enabled at a time. Example output 0 will be
active when the enable inputs are active and A17–A19 are 000. This corresponds to the
address range 00000H – 1FFFFH.
77