Technical Data
MC68HC11E Family
—
Rev. 4
104
Operating Modes and On-Chip Memory
MOTOROLA
Operating Modes and On-Chip Memory
4.6.1.5 EEPROM Byte Erase
This is an example of how to erase a single byte of EEPROM.
BYTEE
LDAB
#$16
BYTE = 1, ERASE = 1, EELAT = 1
STAB
$103B
Set to BYTE erase mode
STAB
0,X
Write any data to address to be erased
LDAB
#$17
BYTE = 1, ERASE = 1, EELAT = 1,
EPGM = 1
STAB
$103B
Turn on high voltage
JSR
DLY10
Delay 10 ms
CLR
$103B
Turn off high voltage and set
to READ mode
4.6.1.6 CONFIG Register Programming
Because the CONFIG register is implemented with EEPROM cells, use
EEPROM procedures to erase and program this register. The procedure
for programming is the same as for programming a byte in the EEPROM
array, except that the CONFIG register address is used. CONFIG can be
programmed or erased (including byte erase) while the MCU is
operating in any mode, provided that PTCON in BPROT is clear.
To change the value in the CONFIG register, complete this procedure.
1.
Erase the CONFIG register.
2.
Program the new value to the CONFIG address.
3.
Initiate reset.
NOTE:
Do not initiate a reset until the procedure is complete.
4.6.2 EEPROM Security
The optional security feature, available only on ROM-based MCUs,
protects the EEPROM and RAM contents from unauthorized access. A
program, or a key portion of a program, can be protected against
unauthorized duplication. To accomplish this, the protection mechanism
restricts operation of protected devices to the single-chip modes. This