MC68HC11F1MFN2 FREESCALE [Freescale Semiconductor, Inc], MC68HC11F1MFN2 Datasheet - Page 32

no-image

MC68HC11F1MFN2

Manufacturer Part Number
MC68HC11F1MFN2
Description
Technical Summary 8-Bit Microcontroller
Manufacturer
FREESCALE [Freescale Semiconductor, Inc]
Datasheet
6.3.3 Row Erase
6.3.4 Byte Erase
6.4 CONFIG Register Programming
32
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
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
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.
STAB
LDAB
STAB
JSR
CLR
LDAB
STAB
STAB
LDAB
STAB
JSR
CLR
LDAB
STAB
STAB
LDAB
STAB
JSR
CLR
Freescale Semiconductor, Inc.
$FE00
#$07
$103B
DLY10
$103B
#$0E
$103B
$xxxx
#$0F
$103B
DLY10
$103B
#$16
$103B
$0,X
#$17
$103B
DLY10
$103B
For More Information On This Product,
Go to: www.freescale.com
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
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
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
MC68HC11F1/FC0
MC68HC11FTS/D

Related parts for MC68HC11F1MFN2