MC68HC11F1MFN2 FREESCALE [Freescale Semiconductor, Inc], MC68HC11F1MFN2 Datasheet - Page 31

no-image

MC68HC11F1MFN2

Manufacturer Part Number
MC68HC11F1MFN2
Description
Technical Summary 8-Bit Microcontroller
Manufacturer
FREESCALE [Freescale Semiconductor, Inc]
Datasheet
Bit 1 — Not implemented. Reads always return one and writes have no effect.
EEON — EEPROM Enable
6.3 EEPROM Programming and Erasure
6.3.1 Programming a Byte
6.3.2 Bulk Erase
MC68HC11F1/FC0
MC68HC11FTS/D
This bit is forced to one in single-chip and bootstrap modes. In test mode, EEON is forced to zero out
of reset. In expanded mode, the EEPROM obeys the state of this bit.
Refer to 6.4 CONFIG Register Programming for instructions on programming this register.
Programming and erasing the EEPROM is controlled by the PPROG register, subject to the block pro-
tect (BPROT) register value. To erase the EEPROM, ensure that the proper bits of the BPROT register
are cleared, and then complete the following steps:
To program the EEPROM, ensure that the proper bits of the BPROT register are cleared, and then com-
plete the following steps:
The following example shows how to program an EEPROM byte. This example assumes that the ap-
propriate bits in BPROT are cleared and that the data to be programmed is present in accumulator A.
PROG
The following example shows how to bulk erase the 512-byte EEPROM. The CONFIG register is not
affected in this example. Note that when the CONFIG register is bulk erased, CONFIG and the 512-byte
array are all erased.
BULKE
0 = EEPROM is removed from the memory map.
1 = EEPROM is present in the memory map.
1. Write to PPROG with the ERASE and EELAT bits set and the BYTE and ROW bits set or
2. Write to the appropriate EEPROM address with any data. Row erase ($xE00–$xE0F, $xE10–
3. Write to PPROG with the ERASE, EELAT, and EEPGM bits set and the BYTE and ROW bits
4. Delay for 10 ms (20 ms for low-voltage operation).
5. Clear the EEPGM bit in PPROG to turn off the high voltage.
6. Clear the PPROG register to reconfigure EEPROM address and data buses for normal opera-
1. Write to PPROG with the EELAT bit set.
2. Write data to the desired address.
3. Write to PPROG with the EELAT and EEPGM bits set.
4. Delay for 10 ms (20 ms for low-voltage operation).
5. Clear the EEPGM bit in PPROG to turn off the high voltage.
6. Clear the PPROG register to reconfigure EEPROM address and data buses for normal opera-
cleared as appropriate.
$xE1F,... $xFF0–$xFFF) requires a single write to any location in the row. Perform bulk erase
by writing to any location in the array.
set or cleared as appropriate.
tions.
tions.
LDAB
STAB
STAA
LDAB
STAB
JSR
CLR
LDAB
STAB
Freescale Semiconductor, Inc.
#$02
$103B
$FE00
#$03
$103B
DLY10
$103B
#$06
$103B
For More Information On This Product,
Go to: www.freescale.com
EELAT=1, EEPGM=0
Set EELAT bit
Store data to EEPROM address
EELAT=1, EEPGM=1
Turn on programming voltage
Delay 10 ms
Turn off high voltage and set to READ mode
ERASE=1, EELAT=1, EEPGM=0
Set EELAT bit
31

Related parts for MC68HC11F1MFN2