English
Language : 

MC68HC11PH8 Datasheet, PDF (73/264 Pages) Motorola, Inc – High-density Complementary Metal Oxide Semiconductor (HCMOS) Microcomputer Unit
PH8.DS03/Modes+mem
—this line does not form part of the document—
[DS97 v 4.1] 08/Apr/97@13:55
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 the
EEPROM 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
$003B
$0D00
#$03
$003B
DLY10
$003B
EELAT=1
Set EELAT bit
Store data to EEPROM address
EELAT=EEPGM=1
Turn on programming voltage
Delay tEEPROG
Turn off high voltage and set to READ mode
3.4.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.
4) Delay for time tEEPROG (See Section A.5.6).
5) Clear the EEPGM bit in PPROG to turn off the high voltage.
6) Clear the PPROG register to reconfigure the EEPROM address and data
buses for normal operation.
The following is an example of how to bulk erase the 768-byte EEPROM. The CONFIG register is
not affected in this example.
BULKE
LDAB
STAB
STAA
LDAB
STAB
JSR
CLR
#$06
$003B
$0D00
#$07
$003B
DLY10
$003B
EELAT=ERASE=1
Set EELAT bit
Store data to any EEPROM address
EELAT=ERASE=EEPGM=1
Turn on programming voltage
Delay tEEPROG
Turn off high voltage and set to READ mode
1
2
3
4
5
6
7
8
9
10
11
12
13
14
MC68HC11PH8
OPERATING MODES AND ON-CHIP MEMORY
¬TPG
MOTOROLA
3-27
15