MOTOROLA
MC68HC11F1/FC0
32
MC68HC11FTS/D
STAB
$FE00
Store any data to any EEPROM address
LDAB
#$07
EELAT=1, EEPGM=1
STAB
$103B
Turn on programming voltage
JSR
DLY10
Delay 10 ms
CLR
$103B
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
#$0E
ROW=1, ERASE=1, EELAT=1, EEPGM=0
STAB
$103B
Set to ROW erase mode
STAB
$xxxx
Store any data to any address in ROW
LDAB
#$0F
ROW=1, ERASE=1, EELAT=1, EEPGM=1
STAB
$103B
Turn on high voltage
JSR
DLY10
Delay 10 ms
CLR
$103B
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
#$16
BYTE=1, ROW=0, ERASE=1, EELAT=1, EEPGM=0
STAB
$103B
Set to BYTE erase mode
STAB
$0,X
Store any data to address to be erased
LDAB
#$17
BYTE=1, ROW=0, ERASE=1, EELAT=1, EEPGM=1
STAB
$103B
Turn on high voltage
JSR
DLY10
Delay 10 ms
CLR
$103B
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.
Содержание Semiconductor MC68HC11F1
Страница 67: ...MC68HC11F1 FC0 MOTOROLA MC68HC11FTS D 67 ...