104
ATmega103(L)
0945G–09/01
Figure 74.
Programming the Flash Waveforms (Continued)
Programming the EEPROM
The programming algorithm for the EEPROM data memory is as follows (refer to “Pro-
gramming the Flash” on page 102 for details on command, address and data loading):
1.
A: Load Command “0001 0001”.
2.
H: Load Address High Byte ($00 - $0F).
3.
B: Load Address Low Byte ($00 - $FF).
4.
E: Load Data Low Byte ($00 - $FF).
L: Write Data Low Byte.
1.
Set BS to “0”. This selects low data.
2.
Give WR a negative pulse. This starts programming of the data byte. RDY/BSY
goes low.
3.
Wait until RDY/BSY goes high to program the next byte.
(See Figure 75 for signal waveforms.)
The loaded command and address are retained in the device during programming. For
efficient programming, the following should be considered:
•
The command needs only be loaded once when writing or reading multiple memory
locations.
•
Address high byte needs only be loaded before programming a new 256-word page
in the EEPROM.
•
Skip writing the data value $FF that is the contents of the entire EEPROM after a
chip erase.
These considerations also apply to Flash, EEPROM and signature bytes reading.
DATA HIGH
DATA
XA1
XA0
BS1
XTAL1
WR
RDY/BSY
RESET
+12V
OE
BS2
PAGEL