Datasheet

MC68HC812A4 Data Sheet, Rev. 7
Freescale Semiconductor 79
Chapter 8
Memory Expansion and Chip-Select
8.1 Introduction
To use memory expansion, the MCU must be operated in one of the expanded modes. Sections of the
standard 64-Kbyte address space have memory expansion windows which allow an external address
space larger than 64 Kbytes. Memory expansion consists of three memory expansion windows and six
address lines which are used in addition to the standard 16 address lines.
The memory expansion function reuses as many as six of the standard 16 address lines. To do this, some
of the upper address lines of internal addresses falling in an active window are overridden. Consequently,
the address viewed externally may not match the internal address. Usage of chip-selects identify the
source of the internal address for debugging and selection of the proper external devices.
All memory expansion windows have a fixed size and two have a fixed address location. The third has
two selectable address locations. When an internal address falls into one of these active windows, it is
translated as shown in Table 8-1.
Addresses ADDR9–ADDR0 are not affected by memory expansion and are the same externally as they
are internally. Addresses ADDR21–ADDR16 are generated only by memory expansion and are
individually enabled by software-programmable control bits. If not enabled, they may be used as
general-purpose I/O (input/output). Addresses ADDR15–ADDR10 can be the internal addresses or they
can be modified by the memory expansion module. These are not available as general-purpose I/O in
expanded modes.
Table 8-1. Memory Expansion Values
(1)
Internal
Address
A21 A20 A19 A18 A17 A16 A15 A14 A13 A12 A11 A10
$0000–$03FF
EWDIR
(2)
= 1,
EWEN = 1
1 1 1 1 PEA17 PEA16 PEA15 PEA14 PEA13 PEA12 PEA11 PEA10
$0000–$03FF
EWDIR
or
EWEN = 0
111111A15A14A13A12A11A10
$0400–$07FF
EWDIR = 0,
EWEN = 1
1 1 1 1 PEA17 PEA16 PEA15 PEA14 PEA13 PEA12 PEA11 PEA10
$0400–$07FF
EWDIR = 1,
EWEN = x
or
EWDIR = x,
EWEN = 0
111111A15A14A13A12A11A10