
EEPROM-2 Memory
Technical Data MC68HC908AZ60A — Rev 2.0
116 EEPROM-2 Memory MOTOROLA
Program/Erase
Using AUTO Bit
An additional feature available for EEPROM-2 program and erase
operations is the AUTO mode. When enabled, AUTO mode will activate
an internal timer that will automatically terminate the program/erase
cycle and clear the EEPGM bit. Please see EEPROM-2 Programming
on page 116, EEPROM-2 Erasing on page 117 and EEPROM-2
Control Register on page 119 for more information.
EEPROM-2
Programming
The unprogrammed or erase state of an EEPROM bit is a logic 1.
Programming changes the state to a logic 0. Only EEPROM bytes in the
non-protected blocks and the EE2NVR register can be programmed.
Use the following procedure to program a byte of EEPROM:
1. Clear EERAS1 and EERAS0 and set EELAT in the EE2CR.
(A)
NOTE: If using the AUTO mode, also set the AUTO bit during Step 1.
2. Write the desired data to the desired EEPROM address.
(B)
3. Set the EEPGM bit.
(C)
Go to Step 7 if AUTO is set.
4. Wait for time, t
EEPGM
, to program the byte.
5. Clear EEPGM bit.
6. Wait for time, t
EEFPV
, for the programming voltage to fall. Go to
Step 8.
7. Poll the EEPGM bit until it is cleared by the internal timer.
(D)
8. Clear EELAT bits.
(E)
NOTE: A. EERAS1 and EERAS0 must be cleared for programming. Setting the
EELAT bit configures the address and data buses to latch data for
programming the array. Only data with a valid EEPROM-2 address will
be latched. If EELAT is set, other writes to the EE2CR will be allowed
after a valid EEPROM-2 write.
B. If more than one valid EEPROM write occurs, the last address and
data will be latched overriding the previous address and data. Once data
is written to the desired address, do not read EEPROM-2 locations other
than the written location. (Reading an EEPROM location returns the
latched data and causes the read address to be latched).