M68HC11
REFERENCE MANUAL
CONFIGURATION AND MODES OF OPERATION
MOTOROLA
3-7
the position of the RAM in the memory map. By changing these bits, the RAM can be
repositioned to the beginning of any 4-Kbyte page in the memory map. After reset,
these bits are zeros ($0); thus, the RAM is initially positioned from $0000–$00FF. If
these four bits are written to ones ($F), the RAM moves to $F000–$F0FF. The follow-
ing explanation of the INIT register discusses what happens when RAM or registers
are mapped to the same area of memory as some other internal resource.
REG[3:0] — 64-Byte Register Block Position
These four bits, which specify the upper hexadecimal digit of the address for the 64-
byte block of internal registers, control the position of these registers in the memory
map. By changing these bits, the register block is repositioned to the beginning of any
4-Kbyte page in the memory map. After reset, these bits are 0001 ($1); therefore, the
registers are initially positioned from $1000–$103F. If these four bits are written to
ones ($F), the registers move to $F000–$F03F. The following explanation discusses
what happens when RAM or registers are mapped to the same area of memory as
some other internal resource.
The INIT register allows software to reposition the internal 256-byte RAM and/or 64-
byte register space to any 4-Kbyte page boundary in the 64-Kbyte memory map.
There are two main reasons a user might want this capability. First, this capability al-
lows the user to position RAM, I/O registers, or both in the direct addressing mode
range ($0000–$00FF). Instructions that use the direct addressing mode assume the
upper eight bits of the address are $00; thus, these instructions take up less program
memory space and operate faster than the equivalent extended addressing mode in-
structions. The second reason for remapping RAM or registers would be to make the
MCU compatible with the memory map of an existing system. For example, the
MC6801 MCU is not compatible with the Motorola EXORciser
. The MDOS
disk-
operating system software requires RAM to exist from $0000–$7FFF, ROM routines
to exist from $E800–$EBFF, and system I/O devices to exist from $EC00–$F000. Be-
cause the MC6801 MCU has internal RAM and registers in $0000–$00FF that cannot
be disabled or moved, it cannot be made compatible with the EXORciser. However,
the MC68HC11A8 can disable its internal ROM with the CONFIG register, and the
RAM and registers can be remapped to $D000 and $C000, respectively, by writing
$DC to the INIT register. This procedure makes the MC68HC11A8 compatible with the
EXORciser system without requiring changes to the existing MDOS software. A vari-
ation on this second reason for remapping RAM and registers would be to make max-
imum use of an external 32-Kbyte RAM in the lower half of the memory map.
Users not needing this capability can leave the RAM and I/O registers in their default
locations ($0000–$00FF for RAM and $1000–$103F for registers). Since the INIT reg-
ister becomes write protected shortly after reset, the user need not worry about acci-
dental changes due to a software error.
The internal address decode circuitry automatically protects against conflicts among
internal resources or between an internal and external resource. When an internal re-
source is read, the external data bus is ignored (even if some external device tries to
drive the data bus) so the CPU will read valid data. If the internal RAM and/or I/O reg-
ister spaces are remapped so an overlap occurs between RAM, register space, or
ROM, priority logic disables all but the highest priority resource. For example, consider