
Operating Modes and On-Chip Memory
EEPROM
M68HC11E Family — Rev. 5
Data Sheet
MOTOROLA
Operating Modes and On-Chip Memory
61
2.5.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
2.5.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.
2.5.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 prevents the memory locations from being
monitored externally because single-chip modes do not allow visibility of the
internal address and data buses. Resident programs, however, have unlimited
access to the internal EEPROM and RAM and can read, write, or transfer the
contents of these memories.
An enhanced security feature which protects EPROM contents, RAM, and
EEPROM from unauthorized accesses is available in MC68S711E9. Refer to
part number.