L
G
R
EEPROM
General Release Specification
MC68HC(7)05H12
—
Rev. 1.0
156
EEPROM
MOTOROLA
EEPRT — EEPROM Protect Bit
In order to achieve a higher degree of protection, the EEPROM is split
into two 128-byte blocks. Block 1 cannot be protected. Block 2 is
protected by the EEPRT bit of the options register. When this bit is set
from 0 to 1 (erased), the protection remains until the next power-on or
external reset. EEPRT can only be written to ‘0’ when the ELAT bit in
the EEPROM control register is set.
1 = Block 2 of the EEPROM array is not protected; all 256 bytes of
EEPROM can be accessed for any read, erase or
programming operations
0 = Block 2 of the EEPROM array is protected; any attempt to
erase or program a location will be unsuccessful
13.5 EEPROM Read, Erase and Programming Procedures
13.5.1 Read Procedure
To read data form EEPROM, the EELAT bit must be clear. EEPGM,
EER1 and EER0 are all forced to zero. EEPROM is read as if it were a
normal ROM. The charge pump generator is off since EEPGM is zero. If
a read is performed while ELAT is set, data will be read as $FF.
13.5.2 Erase Procedure
There are three types of ERASE operation mode see
Table 13-1
, byte
erase, block erase or bulk erase.
To erase a
byte
of EEPROM: set EELAT = 1, ER1 = 0 and ER0 = 1, write
to the address to be erased, and set EEPGM for a time t
EBYTE
.
To erase a
block
of EEPROM: set EELAT = 1, ER1 = 1 and ER0 = 0,
write to any address in the block, and set EEPGM for a time t
EBLOC
.
For a
bulk
erase: set EELAT = 1, ER1 = 1, and ER0 = 1, write to an
address in the array with A0 or A1 = ‘1’, and set EEPGM for a time
t
EBULK
.