English
Language : 

MC68HC05B4 Datasheet, PDF (48/298 Pages) Motorola, Inc – High-density Complementary Metal Oxide Semiconductor (HCMOS) Microcomputer Unit
3.5.4 EEPROM programming operation
To program a byte of EEPROM, the following steps should be taken:
1 Set the E1LAT bit.
3
2 Write address/data to the EEPROM address to be programmed.
3 Set the E1PGM bit.
4 Wait for time tPROG1.
5 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. It is advised that this
is done only for 0→1 transitions, as this saves excessive overwriting of EEPROM.
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.
Options (OPTR) (1)
Address bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
State
on reset
$0100
EE1P SEC Not affected
(1) This register is implemented in EEPROM; therefore reset has no effect on the individual bits.
MOTOROLA
3-6
MEMORY AND REGISTERS
TPG
MC68HC05B6
Rev. 4