Memory Expansion and Chip-Select
MC68HC812A4 Data Sheet, Rev. 7
80
Freescale Semiconductor
8.2 Generation of Chip-Selects
To use chip-selects the MCU must be in one of the expanded modes. Each of the seven chip-selects has
an address space for which it is active — that is, when the current CPU address is in the range of that
chip-select, it becomes active. Chip-selects are generally used to reduce or eliminate external address
decode logic. These active low signals usually are connected directly to the chip-select pin of an external
device.
8.2.1 Chip-Selects Independent of Memory Expansion
Three types of chip-selects are program memory chip-selects, other memory chip-selects and peripheral
chip-selects. Memory chip-selects cover a medium-to-large address space. Peripheral chip-selects
(CS3–CS0) cover a small address space. The program memory chip-select includes the vector space and
is generally used with non-volatile memory. To start the user’s program, the program chip-select is
designed to be active out of reset. This is the only chip-select which has a functional difference from the
others, so a small memory could use a peripheral chip-select and a peripheral could use a memory
chip-select.
Figure 8-1 shows peripheral chip-selects in an expanded portion of the memory map.
Table 8-2 shows
the register settings that correspond to the example. Chip-selects CS2–CS0 always map to the same
2-Kbyte block as the internal register space. The internal registers cover the first 512 bytes and these
chip-selects cover all or part of the 512 bytes following the register space blocking out a full 1-Kbyte
space. CS3 can map with these other chip-selects or be used in a 1-Kbyte space by itself which starts at
either $0000 or $0400. CS3 can be used only for a 1-Kbyte space when it selects the E page of memory
expansion and E page is active.
$0800–$6FFF
1
1111
A15
A14
A13
A12
A11
A10
$7000–$7FFF
DWEN = 1
1
PDA19 PDA18 PDA17 PDA16 PDA15 PDA14 PDA13 PDA12
A11
A10
$7000–$7FFF
DWEN = 0
1
1111
A15
A14
A13
A12
A11
A10
$8000–$BFFF
PWEN = 1
PPA21 PPA20 PPA19
PPA18
PPA17
PPA16
PPA15
PPA14
A13
A12
A11
A10
$8000–$BFFF
PWEN = 0
1
1111
A15
A14
A13
A12
A11
A10
$C000–$FFFF
1
1111
A15
A14
A13
A12
A11
A10
1. All port G assigned to memory expansion
2. The EWDIR bit in the MISC register selects the E window address (1 = $0000–$03FF including direct space and
0 = $0400–$07FF).
Table 8-1. Memory Expansion Values(1) (Continued)
Internal
Address
A21
A20
A19
A18
A17
A16
A15
A14
A13
A12
A11
A10