MC68HC11A8
TECHNICAL DATA
ON-CHIP MEMORY
MOTOROLA
3-7
3
EELAT — EEPROM Latch Control
0 = EEPROM Address and Data Configured for Read Mode
1 = EEPROM Address and Data Configured for Programming/Erasing
EEPGM — EEPROM Programming Voltage Enable
0 = Programming Voltage Switched Off
1 = Programming Voltage Turned On
If an attempt is made to set both the EELAT and EEPGM bits in the same write cycle,
neither will be set. If a write to an EEPROM address is performed while the EEPGM
bit is set, the write is ignored and the programming operation currently in progress is
not disturbed. These two safeguards were included to prevent accidental EEPROM
changes in cases of program runaway. Mask sets A38P, A49N, and date codes before
86xx did not have these safeguards.
3.5.2 Programming/Erasing Internal EEPROM
The EEPROM programming and erasure process is controlled by the PPROG regis-
ter. The following paragraphs describe the various operations performed on the EE-
PROM and include example program segments to demonstrate programming and
erase operations.
These program segments are intended to be simple straightforward examples of the
sequences needed for basic program and erase operations. There are no special re-
strictions on the address modes used and bit manipulation instructions may be used.
Other MCU operations can continue to be performed during EEPROM programming
and erasure provided these operations do not include reads of data from EEPROM
(the EEPROM is disconnected from the read data bus during EEPROM program and
erase operations). The subroutine DLY10 used in these program segments is not
shown but can be any set of instructions which takes ten milliseconds.
3.5.2.1 Read
For the read operation the EELAT bit in the PPROG register must be clear. When this
bit is cleared, the remaining bits in the PPROG register have no meaning or effect, and
the EEPROM may be read as if it were a normal ROM.
3.5.2.2 Programming
During EEPROM programming, the ROW and BYTE bits are not used. If the E clock
frequency is 1 MHz or less, the CSEL bit in the OPTION register must be set. Recall
that in this EEPROM, zeros must be erased by a separate erase operation before pro-
gramming. The following program segment demonstrates how to program an EE-
PROM byte.