English
Language : 

MC68HC11KW1 Datasheet, PDF (88/238 Pages) Motorola, Inc – High-density complementary metal oxide semiconductor HCMOS) microcontroller unit
STAB
LDAB
STAB
JSR
CLR
0,X
#$0F
$003B
DLY10
$003B
Write any data to any address in ROW
ROW=ERASE=EELAT=EEPGM=1
Turn on high voltage
Delay tEEPROG
Turn off high voltage and set to READ mode
4.6.1.4 EEPROM byte erase
4
The following is an example of how to erase a single byte of EEPROM:
BYTEE
LDAB
STAB
STAB
LDAB
STAB
JSR
CLR
#$16
$003B
0,X
#$17
$003B
DLY10
$003B
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 tEEPROG
Turn off high voltage and set to READ mode
4.6.2 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.
1) Erase the CONFIG register.
2) Program the new value to the CONFIG address.
3) Initiate reset.
CONFIG — System configuration register
Configuration control (CONFIG)
Address bit 7
$003F 1
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
State
on reset
1
CLKX
PAREN
NOSEC
NOCO
P
1
EEON 11xx xx1x
For a description of the bits contained in the CONFIG register refer to Section 4.3.2.1.
CONFIG is made up of EEPROM cells and static working latches. The operation of the MCU is
controlled directly by these latches and not the EEPROM byte. When programming the CONFIG
register, the EEPROM byte is accessed. When the CONFIG register is read, the static latches are
accessed.
4-44
OPERATING MODES AND ON-CHIP MEMORY
MC68HC11KW1