Datasheet
ATmega164A/PA/324A/PA/644A/PA/1284/P
2018 Microchip Technology Inc. Data Sheet Complete DS40002070A-page 312
27.9 Serial Programming Instruction set
Table 27-17 and Figure 27-11 on page 313 describes the Instruction set.
Notes: 1. Not all instructions are applicable for all parts.
2. a = address.
3. Bits are programmed ‘0’, unprogrammed ‘1’.
4. To ensure future compatibility, unused Fuses and Lock bits should be unprogrammed (‘1’).
5. Refer to the corresponding section for Fuse and Lock bits, Calibration and Signature bytes and Page size.
6. Instructions accessing program memory use a word address. This address may be random within the page
range.
Note: See www.microchip.com for Application Notes regarding programming and programmers.
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.
Table 27-17. Serial programming instruction set (hexadecimal values)
Instruction/operation
Instruction format
Byte 1 Byte 2 Byte 3 Byte 4
Programming Enable $AC $53 $00 $00
Chip Erase (Program Memory/EEPROM) $AC $80 $00 $00
Poll RDY/BSY $F0 $00 $00 data byte out
Load Instructions
Load Extended Address byte
(1)
$4D $00 Extended addr $00
Load Program Memory Page, High byte $48 $00 addr LSB high data byte in
Load Program Memory Page, Low byte $40 $00 addr LSB low data byte in
Load EEPROM Memory Page (page access) $C1 $00 0000 000aa
(2)
data byte in
Read Instructions
(5)
Read Program Memory, High byte $28 addr MSB addr LSB high data byte out
Read Program Memory, Low byte $20 addr MSB addr LSB low data byte out
Read EEPROM Memory $A0 0000 00aa
(2)
aaaa aaaa
(2)
data byte out
Read Lock bits
(3)
$58 $00 $00 data byte out
Read Signature Byte $30 $00 0000 000aa
(2)
data byte out
Read Fuse bits
(3)
$50 $00 $00 data byte out
Read Fuse High bits
(3)
$58 $08 $00 data byte out
Read Extended Fuse Bits
(3)
$50 $08 $00 data byte out
Read Calibration Byte $38 $00 $00 data byte out
Write Instructions
(5)
Write Program Memory Page
(6)
$4C addr MSB addr LSB $00
Write EEPROM Memory $C0 0000 00aa
(2)
aaaa aaaa
(2)
data byte in
Write EEPROM Memory Page (page access) $C2 0000 00aa
(2)
aaaa aa00
(2)
$00
Write Lock bits
(3)(4)
$AC $E0 $00 data byte in
Write Fuse bits
(3)(4)
$AC $A0 $00 data byte in
Write Fuse High bits
(3)(4)
$AC $A8 $00 data byte in
Write Extended Fuse Bits
(3)(4)
$AC $A4 $00 data byte in