Table 25-9. Pin Values Used to Enter Programming Mode
Pin
PAGEL
XA1
Symbol
Value
Prog_enable[3]
Prog_enable[2]
Prog_enable[1]
Prog_enable[0]
0
0
0
0
XA0
BS1
Table 25-10. XA1 and XA0 Coding
XA1
XA0
Action when XTAL1 is Pulsed
0
0
1
1
0
1
0
1
Load flash or EEPROM address (High or low address byte determined by BS1).
Load data (high or low data byte for Flash determined by BS1).
Load command
No action, Idle
Table 25-11. Command Byte Bit Coding
Command Byte
1000 0000
0100 0000
0010 0000
0001 0000
0001 0001
0000 1000
0000 0100
0000 0010
0000 0011
Command Executed
Chip erase
Write fuse bits
Write lock bits
Write flash
Write EEPROM
Read signature bytes and calibration byte
Read fuse and lock bits
Read flash
Read EEPROM
Table 25-12. No. of Words in a Page and No. of Pages in the Flash
No. of
Pages
Device
Flash Size
Page Size
PCWORD
PCPAGE
PCMSB
8Kwords
(16Kbytes)
64 words
(128 bytes)
ATmega16M1
PC[5:0]
128
256
256
PC[12:6]
12
16Kwords
(32Kbytes)
64 words
(128 bytes)
ATmega32M1/C1
ATmega64M1/C1
PC[5:0]
PC[6:0]
PC[13:6]
PC[14:7]
13
14
32K words
(64K bytes)
128 words
(256 bytes)
Table 25-13. No. of Words in a Page and No. of Pages in the EEPROM
Device
EEPROM Size Page Size
PCWORD
EEA[1:0]
EEA[1:0]
EEA[2:0]
No. of Pages
PCPAGE
EEAMSB
ATmega16M1
ATmega32M1/C1
ATmega64M1/C1
512 bytes
1024 bytes
2048 bytes
4 bytes
4 bytes
8 bytes
128
256
256
EEA[8:2]
EEA[9:2]
EEA[9:2]
9
9
9
260
ATmega16/32/64/M1/C1 [DATASHEET]
7647O–AVR–01/15