Programming the eeprom – Rainbow Electronics ATmega103L User Manual
Page 98

ATmega603/103
98
Programming The EEPROM
The programming algorithm for the EEPROM data memory is as follows (refer to Programming the Flash for details on
Command, Address and Data loading):
1.
A: Load Command ‘0001 0001’.
2.
H: Load Address High Byte ($00-$07/$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 applies to Flash, EEPROM and Signature bytes reading.
Figure 75. Programming the EEPROM waveforms
$11
ADDR. HIGH
ADDR. LOW
DATA LOW
DATA
XA1
XA2
BS1
XTAL1
RDY/BSY
RESET
WR
OE
+12V
BS2
PAGEL