English
Language : 

MC68HC11F1_13 Datasheet, PDF (53/158 Pages) Freescale Semiconductor, Inc – Technical Data
Freescale Semiconductor, Inc.
Recall that zeros must be erased by a separate erase operation before programming.
The following example of how to program an EEPROM byte assumes that the appro-
priate bits in BPROT have been cleared and the data to be programmed is present in
accumulator A.
PROG
LDAB
STAB
STAA
LDAB
STAB
JSR
CLR
#$02
$103B
$FE00
#$03
$103B
DLY10
$103B
EELAT=1, EEPGM=0
Set EELAT bit
Store data to EEPROM address
EELAT=1, EEPGM=1
Turn on programming voltage
Delay 10 ms
Turn off high voltage and set to READ mode
4.4.1.2 EEPROM Bulk Erase
To erase the EEPROM, ensure that the proper bits of the BPROT register are cleared,
then complete the following steps using the PPROG register:
1. Write to PPROG with the ERASE, EELAT, and appropriate BYTE and ROW
bits set.
2. Write to the appropriate EEPROM address with any data. Row erase only re-
quires a write to any location in the row. Bulk erase is accomplished by writing
to any location in the array.
3. Write to PPROG with ERASE, EELAT, EEPGM, and the appropriate BYTE and
ROW bits set.
4. Delay for 10 ms or more, as appropriate.
5. Clear the EEPGM bit in PPROG to turn off the high voltage.
6. Return to step 1 for next byte or row or proceed to step 7.
7. 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. When bulk erasing the CONFIG register, CON-
FIG and the 512-byte array are all erased.
BULKE
LDAB
STAB
STAB
LDAB
STAB
JSR
CLR
#$06
$103B
$FE00
#$07
$103B
DLY10
$103B
ERASE=1, EELAT=1, EEPGM=0
Set EELAT bit
Store any data to any EEPROM address
EELAT=1, EEPGM=1
Turn on programming voltage
Delay 10 ms
Turn off high voltage and set to READ mode
4.4.1.3 EEPROM Row Erase
The following example shows how to perform a fast erase of large sections of EE-
PROM and assumes that index register X contains the address of a location in the de-
sired row.
TECHNICAL DATA
OPERATING MODES AND ON-CHIP MEMORY
For More Information On This Product,
Go to: www.freescale.com
4-15