English
Language : 

MC68HC908AS32A Datasheet, PDF (43/280 Pages) Freescale Semiconductor, Inc – Microcontrollers
Electrically Erasable Programmable Read-Only Memory (EEPROM)
Table 2-3. Example Selective Bit Programming Description
Description
Original state of byte (erased)
First event is recorded by programming bit position 0
Second event is recorded by programming bit position 1
Third event is recorded by programming bit position 2
Fourth event is recorded by programming bit position 3
Events five through eight are recorded in a similar fashion
Program Data
in Binary
N/A
1111:1110
1111:1101
1111:1011
1111:0111
Result
in Binary
1111:1111
1111:1110
1111:1100
1111:1000
1111:0000
NOTE
None of the bit locations are actually programmed more than once although
the byte was programmed eight times.
When this technique is utilized, a program/erase cycle is defined as multiple program sequences (up to
eight) to a unique location followed by a single erase operation.
2.8.1.6 Program/Erase Using AUTO Bit
An additional feature available for EEPROM 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. See 2.8.1.7 EEPROM Programming, 2.8.1.8 EEPROM Erasing, and
2.8.2.1 EEPROM Control Register for more information.
2.8.1.7 EEPROM Programming
The unprogrammed or erase state of an EEPROM bit is a 1. Programming changes the state to a 0. Only
EEPROM bytes in the non-protected blocks and the EENVR register can be programmed.
Use the following procedure to program a byte of EEPROM:
1. Clear EERAS1 and EERAS0 and set EELAT in the EECR.(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, tEEPGM, to program the byte.
5. Clear EEPGM bit.
6. Wait for time, tEEFPV, 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 address will be
latched. If EELAT is set, other writes to the EECR will be allowed after a
valid EEPROM write.
MC68HC908AS32A Data Sheet, Rev. 2.0
Freescale Semiconductor
43