
MOTOROLA
4-2
ON-CHIP MEMORY
M68HC11
REFERENCE MANUAL
chip ROM (ROMON) control bit equals zero in the CONFIG register.
The MC68HC11A8 actually has two separate on-chip ROM memories — the 8-Kbyte
user ROM, which is available for user-defined programs, and a separate 192-byte
ROM, called the bootloader ROM. This bootloader ROM controls the bootstrap loading
process of the special bootstrap mode. In normal modes of operation, the bootloader
ROM is disabled and uses no space in the 64-Kbyte address space of the MCU. Dur-
ing expanded test mode, the bootloader ROM can be enabled for testing but is not in
the memory map after a reset until/unless the test program software enables it. In spe-
cial bootstrap mode, the bootloader ROM is enabled at $BF40–$BFFF by default out
of reset, and the reset Vector in this ROM at $BFFE,BFFF Vectors to the bootloader
program in this ROM.
The bootloader program is also involved with the security feature that allows a user to
protect the contents of EEPROM and RAM from being read by software pirates. When
the security option is enabled, the MCU can only be reset in normal single-chip mode
or special bootstrap mode. In normal single-chip mode, the reset vector is located in
the on-chip 8-Kbyte ROM, and the user’s program controls all program actions. Since
there are no external address or data buses, a pirate could not see what is in the in-
ternal EEPROM or RAM memories. In special bootstrap mode, the reset vector is lo-
cated in the on-chip bootloader ROM, and the bootloader program is in control. The
bootloader program checks the security enable control bit before proceeding to the
program downloading step. If security is enabled, the entire EEPROM and RAM are
erased before downloading continues. After the EEPROM and RAM have been
erased and verified, the CONFIG register (which contains the security enable control
bit) is erased, and downloading can proceed. For additional information about the
CONFIG register and security option, refer to
3.2 EEPROM-Based CONFIG Regis-
ter
.
SECTION 3 CONFIGURATION AND MODES OF OPERATION
also includes ad-
ditional details about modes of operation.
4.2 RAM
This subsection discusses the on-chip RAM of the MC68HC11A8. This 256-byte RAM
can be mapped to the beginning of any 4-Kbyte block in the 64-Kbyte address space.
The methods and reasons for this remapping are discussed; two methods of RAM
standby are also discussed.
4.2.1 Remapping Using the INIT Register
By default, the on-chip RAM is located in the first 256 locations ($0000–$00FF) of the
64-Kbyte memory map. In many (but not all) cases, this location is good for the on-chip
RAM. The first 256 locations in memory are accessible using the direct addressing
mode, which assumes the upper byte of the 16-bit address is $00. Since the direct ad-
dressing mode can address these locations with a one-byte address rather than a two-
byte address, each such instruction saves a byte of program memory space and a cy-
cle of execution time compared to the same instruction using expanded addressing
mode. Depending upon the application, maximum efficiency can be achieved by hav-
ing RAM, I/O registers, or both in this premium address space.