MC68HC05X16
Rev. 1
MOTOROLA
3-7
MEMORY AND REGISTERS
3
If a second word is to be erased, it is important that the E1LAT bit be reset before restarting the
erasing sequence, otherwise any write to a new address will have no effect. This condition provides
a higher degree of security for the stored data.
User programs must be running from the RAM or ROM as the EEPROM will have its address and
data buses latched.
3.5.4
EEPROM programming operation
To program a byte of EEPROM, the following steps should be taken:
1
2
3
4
5
Set the E1LAT bit.
Write address/data to the EEPROM address to be programmed.
Set the E1PGM bit.
Wait for time t
PROG1
.
Reset the E1LAT bit (to logic zero).
While a programming operation is being performed, any access of the EEPROM array will not be
successful.
Warning:
To program a byte correctly, it has to have been previously erased.
If a second word is to be programmed, it is important that the E1LAT bit be reset before restarting
the programming sequence otherwise any write to a new address will have no effect. This condition
provides a higher degree of security for the stored data.
User programs must be running from the RAM or ROM as the EEPROM will have its address and
data buses latched.
Note:
224 bytes of EEPROM (address $0120 to $01FF) can be program and erase protected
under the control of bit 1 of the OPTR register detailed in
Section 3.5.5
.
3.5.5
Options register (OPTR)
This register (OPTR), located at $0100, contains the secure and protect functions for the EEPROM
and allows the user to select options in a non-volatile manner. The contents of the OPTR register
are loaded into data latches with each power-on or external reset.
(1) This register is implemented in EEPROM; therefore reset has no effect on the individual bits.
Address
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
State
on reset
Options (OPTR)
(1)
$0100
EE1P
SEC Not affected