Datasheet

360
ATmega640/1280/1281/2560/2561
2549K–AVR–01/07
If the LSB in RDY/BSY data byte out is ‘1’, a programming operation is still pending.
Wait until this bit returns ‘0’ before the next instruction is carried out.
Within the same page, the low data byte must be loaded prior to the high data byte.
After data is loaded to the page buffer, program the EEPROM page, see Figure 148 on
page 360.
Figure 148. Serial Programming Instruction example
Serial Programming
Characteristics
For characteristics of the Serial Programming module see “SPI Timing Characteristics”
on page 380.
Figure 149. Serial Programming Waveforms
Byte 1 Byte 2 Byte 3 Byte 4
Adr LSB
Bit 15 B 0
Serial Programming Instruction
Program Memory/
EEPROM Memory
Page 0
Page 1
Page 2
Page N-1
Page Buffer
Write Program Memory Page/
Write EEPROM Memory Page
Load Program Memory Page (High/Low Byte)/
Load EEPROM Memory Page (page access)
Byte 1 Byte 2 Byte 3 Byte 4
Bit 15 B 0
Adr MSB
Page Offset
Page Number
Ad
r M
MS
SB
A
A
Adr
r L
LSB
B
MSB
MSB
LSB
LSB
SERIAL CLOCK INPUT
(SCK)
SERIAL DATA INPUT
(MOSI)
(MISO)
SAMPLE
SERIAL DATA OUTPUT