Table 25-17. Serial Programming Instruction Set
Instruction Format
Byte 2 Byte 3
Instruction
Byte 1
Byte4
Operation
Programming enable
Chip erase
1010 1100 0101 0011 xxxx xxxx xxxx xxxx Enable serial programming after RESET goes low.
1010 1100 100x xxxx xxxx xxxx xxxx xxxx Chip erase EEPROM and flash.
Read H (high or low) data o from program memory
0010 H000 000a aaaa bbbb bbbb oooo oooo
Read program memory
at word address a:b.
Write H (high or low) data i to program memory
page at word address b. Data low byte must be
loaded before Data high byte is applied within the
same address.
Load program memory page 0100 H000 000x xxxx bbbb bbbb
iiii iiii
Write program memory page 0100 1100 aaaa aaaa bbxx xxxx xxxx xxxx Write program memory page at address a:b.
Read data o from EEPROM memory at address
Read EEPROM memory
1010 0000 000x xxaa bbbb bbbb oooo oooo
a:b.
Write EEPROM memory
1100 0000 000x xxaa bbbb bbbb
1100 0001 0000 0000 0000 00bb
iiii iiii
iiii iiii
Write data i to EEPROM memory at address a:b.
Load EEPROM memory
page (page access)
Load data i to EEPROM memory page buffer. After
data is loaded, program EEPROM page.
Write EEPROM memory
page (page access)
1100 0010 00xx xxaa bbbb bb00 xxxx xxxx Write EEPROM page at address a:b.
Read lock bits. “0” = programmed,
0101 1000 0000 0000 xxxx xxxx xxoo oooo “1” = unprogrammed. See Table 25-1 on page 255
for details.
Read lock bits
Write lock bits. Set bits = “0” to program lock bits.
See Table 25-1 on page 255 for details.
0011 0000 000x xxxx xxxx xxbb oooo oooo Read signature byte o at address b.
Write lock bits
1010 1100 111x xxxx xxxx xxxx
11ii iiii
Read signature byte
Write fuse bits
1010 1100 1010 0000 xxxx xxxx
iiii iiii
Set bits = “0” to program, “1” to unprogram.
Set bits = “0” to program, “1” to unprogram. See
Table 25-6 on page 257 for details.
Write fuse high bits
Write extended fuse bits
Read fuse bits
1010 1100 1010 1000 xxxx xxxx
iiii iiii
Set bits = “0” to program, “1” to unprogram. See
Table 25-4 on page 256 for details.
1010 1100 1010 0100 xxxx xxxx
xxii iiii
Read Fuse bits. “0” = programmed,
“1” = unprogrammed.
0101 0000 0000 0000 xxxx xxxx oooo oooo
Read fuse high bits. “0” = programmed,
Read fuse high bits
0101 1000 0000 1000 xxxx xxxx oooo oooo “1” = unprogrammed. See Table 25-6 on page 257
for details.
Read extended fuse bits. “0” = programmed,
0101 0000 0000 1000 xxxx xxxx oooo oooo “1” = unprogrammed. See Table 25-4 on page
256 for details.
Read extended fuse bits
Read calibration byte
Poll RDY/BSY
0011 1000 000x xxxx 0000 0000 oooo oooo Read calibration byte
If o = “1”, a programming operation is still busy.
1111 0000 0000 0000 xxxx xxxx xxxx xxxo Wait until this bit returns to “0” before applying
another command.
Note:
a = address high bits, b = address low bits, H = 0 - Low byte, 1 - High Byte, o = data out, i = data in, x = don’t care
25.9.4 SPI Serial Programming Characteristics
For characteristics of the SPI module see Section 25.9.4 “SPI Serial Programming Characteristics” on page 272.
272
ATmega16/32/64/M1/C1 [DATASHEET]
7647O–AVR–01/15