Datasheet
Generation of Chip-Selects
MC68HC812A4 Data Sheet, Rev. 7
Freescale Semiconductor 81
CS3 can be used with a 1-Kbyte space in systems not using memory expansion. However, it must be
made to appear as if memory expansion is in use. One of many possible configurations is:
• Select the desired 1-Kbyte space for EPAGE (EWDIR in MISC in the MMI).
• Write the EPAGE register with $0000, if EWDIR is one or $0001 if EWDIR is 0.
• Designate all port G pins as I/O.
• Enable EPAGE and CS3.
• Make CS3 follow EPAGE.
8.2.2 Chip-Selects Used in Conjunction with Memory Expansion
Memory expansion and chip-select functions can work independently, but systems requiring memory
expansion perform better when chip-selects are also used. For each memory expansion window there is
a chip-select (or two) designed to function with it.
Figure 8-2 shows a memory expansion and chip-select example using three chip-selects. Table 8-3
shows the register settings that correspond to the example. The program space consists of 128 Kbytes
of addressable memory in eight 16-Kbyte pages. Page 7 is always accessible in the space from $C000
to $FFFF. The data space consists of 64 Kbytes of addressable memory in 16, 4-Kbyte pages. Unless
CSD is used to select the external RAM, pages 0 through 6 appear in the $0000 to $6FFF space wherever
there is no higher priority resource. The extra space consists of four, 1-Kbyte pages making 4 Kbytes of
addressable memory.
If memory is increased to the maximum in this example, the program space will consist of 4 Mbytes of
addressable space with 256 16-Kbyte pages and page $FF always available. The data space will be 1
Mbyte of addressable space with 256 4-Kbyte pages and pages $F0 to $F6 mirrored to the $0000 to
$6FFF space. The extra space will be 256 Kbytes of addressable space in 256 1-Kbyte pages.
