English
Language : 

MC68HC08AS32 Datasheet, PDF (65/394 Pages) Motorola, Inc – M68HC08 Family of 8-bit microcontroller units (MCUs)
Electrically Erasable Programmable ROM (EEPROM)
Functional Description
Follow this procedure to program a byte of EEPROM. Refer to 21.5
5.0-Volt DC Electrical Characteristics Control Timing for timing
values.
1. Clear EERAS1 and EERAS0 and set EELAT in the EECR
($FE1D). Set value of tEEPGM. (See Notes a and b.)
2. Write the desired data to any user EEPROM address.
3. Set the EEPGM bit. (See Note c.)
4. Wait for a time, tEEPGM, to program the byte.
5. Clear the EEPGM bit.
6. Wait for the programming voltage time to fall, tEEFPV.
7. Clear EELAT bits. (See Note d.)
8. Repeat steps 1 through 7 for more EEPROM programming.
NOTES:
a. EERAS1 and EERAS0 must be cleared for programming.
Otherwise, you will be in erase mode.
b. Setting the EELAT bit configures the address and data buses
to latch data for programming the array. Only data with a valid
EEPROM address will be latched. If another consecutive valid
EEPROM write occurs, this address and data will override the
previous address and data. Any attempts to read other
EEPROM data will read the latched data. If EELAT is set,
other writes to the EECR will be allowed after a valid
EEPROM write.
c. The EEPGM bit cannot be set if the EELAT bit is cleared and
a non-EEPROM write has occurred. This is to ensure proper
programming sequence. When EEPGM is set, the on-board
charge pump generates the program voltage and applies it to
the user EEPROM array. When the EEPGM bit is cleared, the
program voltage is removed from the array and the internal
charge pump is turned off.
d. Any attempt to clear both EEPGM and EELAT bits with a
single instruction will clear only EEPGM to allow time for
removal of high voltage from the EEPROM array.
MC68HC08AS32 — Rev. 3.0
MOTOROLA
Electrically Erasable Programmable ROM (EEPROM)
Advance Information
65