AN2690 Freescale Semiconductor / Motorola, AN2690 Datasheet - Page 12

no-image

AN2690

Manufacturer Part Number
AN2690
Description
Low Frequency EEPROM Emulation on the MC68HLC908QY4
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2690
12
Low Frequency EEPROM Emulation on the MC68HLC908QY4
The application starts up from the internal 4 MHz IRC, switches to the external
32768 Hz crystal, and then runs in an infinite loop, controlling four LEDs on the
board.
Out of POR, with the emulated EEPROM page blank (FF), the first LED (D8) is
lit and the other 3 LED's, D7 to D5, are off. After 1 second, the pattern is shifted
to the left, such that D7 is now lit and D8, D6 and D5 are off. This pattern
continues until D5 is lit and the others are off. The next iteration reverses the
pattern, and this continues indefinitely.
The LEDs can be disabled by placing a jumper between pins PTB1 and GND.
This allows the MCU current to be measured without including the additional
current required to drive the LEDs. When the jumper is removed, the sequence
starts with the same pattern as when the jumper was installed. If a “program
EEPROM” request occurs when the jumper is installed, the LED off pattern is
stored in EEPROM. The direction is the same as when the jumper was
installed.
The code also checks the status of switch S1, which is used to signal a
“program EEPROM” request. If the switch is pressed, the current LED pattern
and the direction that the pattern is being shifted are stored to emulated
EEPROM, with a count byte that is incremented each time new data is stored.
Figure 5
reserved for EEPROM emulation.
Freescale Semiconductor, Inc.
For More Information On This Product,
shows details of the data that is stored and the FLASH area that is
Go to: www.freescale.com
EEStart: $EE00
$EE3F
Figure 5. EEPROM Configuration
ApplicationFlags
ApplicationFlags
CountByte+1
CountByte
PORT B
PORT B
First
EEPROM
Data
Store
Second
EEPROM
Data
Store
MOTOROLA

Related parts for AN2690