English
Language : 

MC68HC711K4CFN4 Datasheet, PDF (22/80 Pages) Motorola, Inc – 8-Bit Microcontroller
3.4 EEPROM
The 640-byte EEPROM is initially located at $0D80 after reset, assuming EEPROM is enabled in the
memory map by the EEON bit in the CONFIG register. EEPROM can be placed at any 4-Kbyte bound-
ary ($xD80) by writing appropriate values to the INIT2 register. Note that EEPROM can be mapped so
that it contains the vector space. Refer to Figure 4. The MC68HC11K0, MC68HC11K3, MC68L11K0,
and MC68L11K3 have no EEPROM. Refer to the ordering information tables.
Programming and erasing the EEPROM is controlled by the PPROG register, and dependent upon the
block protect (BPROT) register value. An on-chip charge pump develops the high voltage required for
programming and erasing. When the frequency of the E clock is less than 1 MHz, select the internal
clock source to drive the EEPROM charge pump by writing one to the CSEL bit in the OPTION register.
The CONFIG register consists of a single EEPROM byte. Although the byte is not included in the 640-
byte EEPROM array, programming the CONFIG register requires the same procedure as any byte in
the array. The erased state of bits in the CONFIG register is logic one. Refer to the CONFIG register
description that follows this section.
The erased state of an EEPROM byte is $FF (all ones).
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. Set the ERASE, EELAT, and appropriate BYTE and ROW bits in PPROG register.
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 done by writing to any location in the array.
3. Set the ERASE, EELAT, EEPGM, and appropriate BYTE and ROW bits in PPROG register.
4. Delay for 10 ms or more, as appropriate.
5. Clear the EEPGM bit in PPROG to turn off the programming voltage.
6. Clear the PPROG register to reconfigure the EEPROM address and data buses for normal op-
eration.
To program the EEPROM, ensure the proper bits of the BPROT register are cleared and use the
PPROG register to complete the following steps:
1. Set the EELAT bit in PPROG register.
2. Write data to the desired address.
3. Set EEPGM bit in PPROG.
4. Delay for 10 ms or more, as appropriate.
5. Clear the EEPGM bit in PPROG to turn off the programming voltage.
6. Clear the PPROG register to reconfigure the EEPROM address and data buses for normal op-
eration.
CAUTION
Since it is possible to perform other operations while the EEPROM programming/
erase operation is in progress, it is common to start the operation and then return
to the main program until the 10 ms is completed. When the EELAT bit is set at the
beginning of a program/erase operation, the EEPROM is electronically removed
from the memory map; thus, it is not accessible during the program/erase cycle.
Care must be taken to ensure that EEPROM resources will not be needed by any
routines in the code during the 10 ms program/erase time.
PPROG —EEPROM Programming Control
RESET:
Bit 7
ODD
0
6
EVEN
0
5
LVPI
0
4
BYTE
0
3
ROW
0
2
ERASE
0
1
EELAT
0
$003B
Bit 0
EEPGM
0
MOTOROLA
22
M68HC11 K Series
MC6HC11KTS/D