MOTOROLA
4-14
ON-CHIP MEMORY
M68HC11
REFERENCE MANUAL
the location first; however, it is better to perform an erase first as shown in this example
and explained in
4.4 EEPROM Application Information
.
* On entry, A-data to be programmed into CONFIG
"
"
CNFCH
LDAB
#$06
STAB
$103B
STAB
$103F
LDAB
#$07
STAB
$103B
JSR
DLY10
LDAB
#$02
STAB
$103B
STAA
$103F
LDAB
#$03
STAB
$103B
JSR
DLY10
CLR
$103B
"
"
Set to BULK erase mode
Write any data to CONFIG address
Turn on programming voltage
Delay 10 mS
Turn off EEPGM, leave EELAT on
Store new CONFIG data
Set EEPGM bit (EELAT-1)
Delay 10 mS
Turn off high voltage & set to read mode
4.3.6 Optional EEPROM Security Mode
There is an optional security mode feature that can be used to protect the EEPROM
and RAM contents from unauthorized access. Most MCU products are of little or no
use without the software programs that control them. By protecting the secrecy of the
program or a key part of the program, a product can be protected against unauthorized
duplication. The MC68HC11A8 solves the dilemma of protecting against unauthorized
access while permitting testing and recovery of protected parts for reuse.
The protection mechanism operates on the principle of restricting protected devices to
the single-chip modes of operation. Since single-chip modes do not allow visibility of
the internal address and data buses, the contents of memory locations cannot be mon-
itored externally. Since the user’s program has unlimited access to the internal EE-
PROM and RAM, it is still possible for the application program to read information out
of these memories, write new information into them, or even report the contents of
these memories via MCU I/O ports. The user can develop a program to enter secret
information into the MCU or to read secret information out of the MCU by some secret
access procedure. All or part of this secret access procedure should be programmed
in the EEPROM so that a software pirate could not decode the secret procedure by
disassembling the ROM program, which can be read after turning off the security
mode. Although the security mode can be turned off easily by anyone at any time, this
can only be done after the information in EEPROM and internal RAM have been com-
pletely erased.
Two conditions are required to engage the security option. First, the option must be
enabled by a mask option. This option is normally requested at the time the customer
submits the mask program for the internal 8-Kbyte ROM. Since this option is enabled
or disabled during physical manufacturing of the silicon die, the choice must be made
prior to manufacturing. Although this first level of enable makes the MCU capable of
being secured, it does not activate the security mode. The second requirement to en-