
45
AT90S1200
0838H–AVR–03/02
3.
If a Chip Erase is performed (must be done to erase the Flash), wait t
WD_ERASE
after the instruction, give RESET a positive pulse, and start over from step 2.
See Table 21 on page 47 for t
WD_ERASE
value.
4.
The Flash or EEPROM array is programmed one byte at a time by supplying the
address and data together with the appropriate Write instruction. An EEPROM
memory location is first automatically erased before new data is written. Wait
t
WD_PROG
after transmitting the instruction. In an erased device, no $FFs in the
data file(s) needs to be programmed. See Table 22 on page 47 for t
WD_PROG
value.
5.
Any memory location can be verified by using the Read instruction which returns
the content at the selected address at the serial output MISO (PB6) pin.
At the end of the programming session, RESET can be set high to commence nor-
mal operation.
6.
Power-off sequence (if needed):
Set XTAL1 to “0” (if a crystal is not used or the device is running from the Internal
RC Oscillator).
Set RESET to “1”.
Turn V
CC
power off.
Data Polling EEPROM
When a byte is being programmed into the EEPROM, reading the address location
being programmed will give the value P1 until the auto-erase is finished, and then the
value P2. See Table 18 for P1 and P2 values.
At the time the device is ready for a new EEPROM byte, the programmed value will read
correctly. This is used to determine when the next byte can be written. This will not work
for the values P1 and P2, so when programming these values, the user will have to wait
for at least the prescribed time
t
WD_PROG
before programming the next byte. See Table 22
for
t
WD_PROG
value. 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 first chip-erasing the device.
Data Polling Flash
When a byte is being programmed into the Flash, 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 determine when the next byte can
be written. This will not work for the value $FF, so when programming this value, the
user will have to wait for at least t
WD_PROG
before programming the next byte. As a chip-
erased device contains $FF in all locations, programming of addresses that are meant
to contain $FF, can be skipped.
Table 18.
Read Back Value during EEPROM Polling
Part
P1
P2
AT90S1200
$00
$FF