English
Language : 

MC68HC08AS32A Datasheet, PDF (44/296 Pages) Motorola, Inc – Microcontrollers
Memory
Freescale Semiconductor, Inc.
2.5.1.6 Program/Erase Using AUTO Bit
An additional feature available for EEPROM program and erase operations is the
AUTO mode. When the AUTO mode is enabled, the EEPROM control circuit has
a state machine which will automatically terminate the program/erase cycle and
clear the EEPGM bit. See 2.5.1.7 EEPROM Programming, 2.5.1.8 EEPROM
Erasing, and 2.5.2.1 EEPROM Control Register for more information.
2.5.1.7 EEPROM 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 he EENVR register can be programmed.
NOTE:
Use the following procedure to program a byte of EEPROM:
1. Clear EERAS1 and EERAS0 and set EELAT in the EECR.(A)
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 6 if AUTO is set.
4. Wait for time, tEEPGM, to program the byte.
5. Clear EEPGM bit. Go to Step 7.
6. Poll the EEPGM bit until it is cleared by the state machine.(D)
7. Wait for a time, tEEFPV, for the programming voltage to fall. Go to Step 8.
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 address will be latched. If EELAT is set, other
writes to the EECR will be allowed after a valid EEPROM 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 locations other than the written location.
(Reading an EEPROM location returns the latched data and causes the read
address to be latched.
C. The EEPGM bit cannot be set if the EELAT bit is cleared or a non-valid
EEPROM address is latched. This is to ensure proper programming sequence.
Once EEPGM is set, do not read any EEPROM locations; otherwise, the current
program cycle will be unsuccessful. When EEPGM is set, the on-board
programming sequence will be activated. Data cannot be read from the array until
the programming sequence is completed.
D. The delay time for the EEPGM bit to be cleared in AUTO mode is less than
tEEPGM. However, on other MCUs this delay time may be different. For forward
compatibility, software should not make any dependency on this delay time.
Data Sheet
44
Memory
For More Information On This Product,
Go to: www.freescale.com
MC68HC08AS32A — Rev. 1
MOTOROLA