English
Language : 

MC68HC11F1 Datasheet, PDF (32/68 Pages) Motorola, Inc – Technical Summary 8-Bit Microcontroller
STAB
LDAB
STAB
JSR
CLR
$FE00
#$07
$103B
DLY10
$103B
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
6.3.3 Row Erase
The following example shows how to perform a fast erase of large sections of EEPROM. This example
assumes that index register X contains the address of a location in the desired row.
ROWE
LDAB
STAB
STAB
LDAB
STAB
JSR
CLR
#$0E
$103B
$xxxx
#$0F
$103B
DLY10
$103B
ROW=1, ERASE=1, EELAT=1, EEPGM=0
Set to ROW erase mode
Store any data to any address in ROW
ROW=1, ERASE=1, EELAT=1, EEPGM=1
Turn on high voltage
Delay 10 ms
Turn off high voltage and set to READ mode
6.3.4 Byte Erase
The following is an example of how to erase a single byte of EEPROM. This example assumes that in-
dex register X contains the address of the byte to be erased.
BYTEE
LDAB
STAB
STAB
LDAB
STAB
JSR
CLR
#$16
$103B
$0,X
#$17
$103B
DLY10
$103B
BYTE=1, ROW=0, ERASE=1, EELAT=1, EEPGM=0
Set to BYTE erase mode
Store any data to address to be erased
BYTE=1, ROW=0, ERASE=1, EELAT=1, EEPGM=1
Turn on high voltage
Delay 10 ms
Turn off high voltage and set to READ mode
6.4 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 the following procedure. Do not initiate
a reset until the procedure is complete. The new value will not take effect until after the next reset se-
quence.
1. Erase the CONFIG register.
2. Program the new value to the CONFIG address.
3. Initiate reset.
MOTOROLA
32
MC68HC11F1/FC0
MC68HC11FTS/D