
Operating Modes and On-Chip Memory
EEPROM and the CONFIG Register
M68HC11K Family
Technical Data
MOTOROLA
Operating Modes and On-Chip Memory
93
This procedure programs one byte into EPROM. On entry, accumulator
A contains the byte of data to be programmed and X contains the target
EPROM address.
EPROG LDAB
#$20
STAB
$002B
Set ELAT bit to enable EPROM latches.
(EPGM must be 0.)
STAA
$0,X
Store data to EPROM address
LDAB
#$21
STAB
$002B
Set EPGM bit with ELAT=1
to enable EPROM programming voltage
JSR
DLYEP
Delay 1-2 ms
CLR
$002B
Turn off programming voltage and set to
READ mode
4.8 EEPROM and the CONFIG Register
The 640-byte on-board EEPROM is enabled by the EEON bit in the
CONFIG register and located on a 4-K boundary determined by the
INIT2 register (4.6.3 EEPROM). An internal charge pump supplies the
programming voltage for the EEPROM, eliminating the need for an
external high-voltage supply.
When appropriate bits in the BPROT register are cleared, the PPROG
register controls programming and erasing the EEPROM. The PPROG
register can be read or written at any time, but logic enforces defined
programming and erasing sequences to prevent unintentional changes
to EEPROM data. When the EELAT bit in the PPROG register is cleared,
the EEPROM can be read as if it were a ROM.
The clock source driving the charge pump is software selectable. When
the clock select (CSEL) bit in the OPTION register is 0, the E clock is
used; when CSEL is 1, an on-chip resistor-capacitor (RC) oscillator is
used.
The EEPROM programming voltage power supply voltage to the
EEPROM array is not enabled until there has been a write to PPROG
with EELAT set and PGM cleared. This must be followed by a write to a
valid EEPROM location or to the CONFIG address, and then a write to
PPROG with both the EELAT and EPGM bits set. Any attempt to set