Operating Modes and On-Chip Memory
Data Sheet
M68HC11E Family — Rev. 5
60
Operating Modes and On-Chip Memory
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA
EPGM — EPROM/OTPROM/EEPROM Programming Voltage Enable Bit
0 = Programming voltage to EEPROM array switched off
1 = Programming voltage to EEPROM array switched on
During EEPROM programming, the ROW and BYTE bits of PPROG are not used.
If the frequency of the E clock is 1 MHz or less, set the CSEL bit in the OPTION
register. Recall that 0s must be erased by a separate erase operation before
programming. The following examples of how to program an EEPROM byte
assume that the appropriate bits in BPROT are cleared.
PROG
LDAB
STAB
STAA
#$02
$103B
$XXXX
EELAT = 1
Set EELAT bit
Store data to EEPROM address
(for valid EEPROM address see memory
map for each device)
EELAT = 1, EPGM = 1
Turn on programming voltage
Delay 10 ms
Turn off high voltage and set
to READ mode
LDAB
STAB
JSR
CLR
#$03
$103B
DLY10
$103B
2.5.1.3 EEPROM Bulk Erase
This is an example of how to bulk erase the entire EEPROM. The CONFIG register
is not affected in this example.
BULKE
LDAB
STAB
STAA
#$06
$103B
$XXXX
EELAT = 1, ERASE = 1
Set to BULK erase mode
Store data to any EEPROM address (for
valid EEPROM address see memory map
for each device)
EELAT = 1, EPGM = 1, ERASE = 1
Turn on high voltage
Delay 10 ms
Turn off high voltage and set
to READ mode
LDAB
STAB
JSR
CLR
#$07
$103B
DLY10
$103B
2.5.1.4 EEPROM Row Erase
This example shows how to perform a fast erase of large sections of EEPROM.
ROWE
LDAB
STAB
STAB
LDAB
STAB
JSR
CLR
#$0E
$103B
0,X
#$0F
$103B
DLY10
$103B
ROW = 1, ERASE = 1, EELAT = 1
Set to ROW erase mode
Write any data to any address in ROW
ROW = 1, ERASE = 1, EELAT = 1, EPGM = 1
Turn on high voltage
Delay 10 ms
Turn off high voltage and set
to READ mode
F
Freescale Semiconductor, Inc.
n
.