Download 8XC196NT Microcontroller User`s Manual

Transcript
CHAPTER 14
INTERFACING WITH EXTERNAL MEMORY
The device can interface with a variety of external memory devices. It supports either a fixed 8bit bus width, a fixed 16-bit bus width, or a dynamic 8-bit/16-bit bus width; internal control of
wait states for slow external memory devices; a bus-hold protocol that enables external devices
to take over the bus; and several bus-control modes. These features provide a great deal of flexibility when interfacing with external memory devices.
In addition to describing the signals and registers related to external memory, this chapter discusses the process of fetching the chip configuration bytes and configuring the external bus. It also
provides examples of external memory configurations.
14.1 INTERNAL AND EXTERNAL ADDRESSES
The address that external devices see is different from the address that the device generates internally. Internally, the device has 24 address lines, but only the lower 20 address lines (A19:16 and
AD15:0) are implemented with external pins. The absence of the upper four address bits at the
external pins causes different internal addresses to have the same external address. For example,
the internal addresses FF2080H, 7F2080H, and F2080H all appear at the 20 external pins as
F2080H. The upper nibble of the internal address has no effect on the external address.
The address seen by an external device also depends on the number of address lines that the external system uses. If the address on the external pins (A19:16 and AD15:0) is F2080H, and only
A17:16 and AD15:0 are connected to the external device, the external device sees 32080H. The
upper four address lines A19:16 are implemented by the EPORT. Table 14-1 shows how the external address depends on the number of EPORT lines used to address the external device.
Table 14-1. Example of Internal and External Addresses
EPORT Lines
Connected to the
External Device
Internal Address
Address on the
Device Pins
Address Seen by
External Device
A16
xF2080H
F2080H
12080H
A17:16
xF2080H
F2080H
32080H
A18:16
xF2080H
F2080H
72080H
A19:16
xF2080H
F2080H
F2080H
14-1