English
Language : 

MC68HC11P2 Datasheet, PDF (69/268 Pages) Motorola, Inc – Microcontrollers
Freescale Semiconductor, Inc.
Operating Modes and On-Chip Memory
EPROM, EEPROM and CONFIG register
6. Clear the PPROG register to reconfigure the EEPROM address
and data buses for normal operation.
The following is an example of how to bulk erase the 512-byte EEPROM.
The CONFIG register is not affected in this example.
BULKE
LDAB
STAB
STAA
LDAB
STAB
JSR
CLR
#$02
$103B
$0D80
#$03
$103B
DLY10
$103B
EELAT=1
Set EELAT bit
Store data to any EEPROM address
EELAT=EEPGM=1
Turn on programming voltage
Delay 10 ms
Turn off high voltage and set to READ mode
3.6.2.3 EEPROM row erase
The following 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=ERASE=EELAT=1
Set to ROW erase mode
Write any data to any address in ROW
ROW=ERASE=EELAT=EEPGM=1
Turn on high voltage
Delay 10 ms
Turn off high voltage and set to READ mode
3.6.2.4 EEPROM byte erase
The following is an example of how to erase a single byte of EEPROM:
BYTEE
LDAB
STAB
STAB
LDAB
STAB
JSR
CLR
#$16
$103B
0,X
#$17
$103B
DLY10
$103B
BYTE=ERASE=EELAT=1
Set to BYTE erase mode
Write any data to address to be erased
BYTE=ERASE=EELAT=EEPGM=1
Turn on high voltage
Delay 10 ms
Turn off high voltage and set to READ mode
MC68HC11P2 — Rev 1.0
Operating Modes and On-Chip Memory
For More Information On This Product,
Go to: www.freescale.com
Technical Data