English
Language : 

MC68HC11P2 Datasheet, PDF (68/268 Pages) Motorola, Inc – Microcontrollers
Freescale Semiconductor, Inc.
Operating Modes and On-Chip Memory
EELAT — EEPROM latch control
1 = EEPROM address and data bus set up for programming or
erasing.
0 = EEPROM address and data bus set up for normal reads.
When the EELAT bit is cleared, the EEPROM can be read as if it were
a ROM. The block protect register has no effect during reads.
EEPGM — EEPROM program command
1 = Program or erase voltage switched on to EEPROM array.
0 = Program or erase voltage switched off to EEPROM array.
During EEPROM programming, the ROW and BYTE bits of PPROG
are not used. If the frequency of the E clock is 1MHz or less, set the
CSEL bit in the OPTION register. Remember 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 appropriate bits in BPROT have been cleared.
PROG
LDAB
STAB
STAA
LDAB
STAB
JSR
CLR
#$02
$103B
$0D80
#$03
$103B
DLY10
$103B
EELAT=1
Set EELAT bit
Store data to EEPROM address
EELAT=EEPGM=1
Turn on programming voltage
Delay 10 ms
Turn off high voltage and set to READ mode
3.6.2.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 requires 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.
Technical Data
Operating Modes and On-Chip Memory
For More Information On This Product,
Go to: www.freescale.com
MC68HC11P2 — Rev 1.0