beautypg.com

Data polling eeprom, Atmega161(l) – Rainbow Electronics ATmega161L User Manual

Page 127

background image

127

ATmega161(L)

1228C–AVR–08/02

t

WD_FLASH

before programming the next page. As a chip-erased device contains $FF in

all locations, programming of addresses that are meant to contain $FF can be skipped.
See Table 46 for t

WD_FLASH

value.

Data Polling EEPROM

When a new byte has been written and is being programmed into EEPROM, reading the
address location being programmed will give the value $FF. At the time the device is
ready for a new byte, the programmed value will read correctly. This is used to deter-
mine when the next byte can be written. This will not work for the value $FF, but the user
should keep the following in mind: As a chip-erased device contains $FF in all locations,
programming of addresses that are meant to contain $FF can be skipped. This does not
apply if the EEPROM is reprogrammed without chip-erasing the device. In this case,
data polling cannot be used for the value $FF, and the user will have to wait at least
t

WD_EEPROM

before programming the next byte. See Table 46 for t

WD_EEPROM

value.

Figure 80. Serial Programming Waveforms

Table 46. Minimum Wait Delay before Writing the Next Flash or EEPROM Location

Symbol

Minimum Wait Delay

t

WD_FLASH

14 ms

t

WD_EEPROM

3.4 ms

Table 47. Minimum Wait Delay after a Chip Erase Command

Symbol

Minimum Wait Delay

t

WD_ERASE

28 ms

MSB

MSB

LSB

LSB

SERIAL CLOCK INPUT

PB7(SCK)

SERIAL DATA INPUT

PB5 (MOSI)

PB6 (MISO)

SAMPLE

SERIAL DATA OUTPUT