ATmega640/1280/1281/2560/2561
Table 30-18. JTAG Programming Instruction (Continued)
Set (Continued) a = address high bits, b = address low bits, c = address extended bits, H = 0 - Low byte, 1 - High Byte,
o = data out, i = data in, x = don’t care
Instruction
TDI Sequence
TDO Sequence
Notes
4g. Poll for Page Write Complete
5a. Enter EEPROM Read
5b. Load Address High Byte
5c. Load Address Low Byte
0110011_00000000
0100011_00000011
0000111_aaaaaaaa
0000011_bbbbbbbb
xxxxxox_xxxxxxxx
xxxxxxx_xxxxxxxx
xxxxxxx_xxxxxxxx
xxxxxxx_xxxxxxxx
(2)
(10)
0110011_bbbbbbbb
0110010_00000000
0110011_00000000
xxxxxxx_xxxxxxxx
xxxxxxx_xxxxxxxx
xxxxxxx_oooooooo
5d. Read Data Byte
6a. Enter Fuse Write
0100011_01000000
xxxxxxx_xxxxxxxx
xxxxxxx_xxxxxxxx
6b. Load Data Low Byte(6)
0010011_iiiiiiii
(3)
(1)
0111011_00000000
0111001_00000000
0111011_00000000
0111011_00000000
xxxxxxx_xxxxxxxx
xxxxxxx_xxxxxxxx
xxxxxxx_xxxxxxxx
xxxxxxx_xxxxxxxx
6c. Write Fuse Extended Byte
6d. Poll for Fuse Write Complete
0110111_00000000
xxxxxox_xxxxxxxx
(2)
(3)
6e. Load Data Low Byte(7)
0010011_iiiiiiii
xxxxxxx_xxxxxxxx
0110111_00000000
0110101_00000000
0110111_00000000
0110111_00000000
xxxxxxx_xxxxxxxx
xxxxxxx_xxxxxxxx
xxxxxxx_xxxxxxxx
xxxxxxx_xxxxxxxx
6f. Write Fuse High Byte
(1)
6g. Poll for Fuse Write Complete
0110111_00000000
xxxxxox_xxxxxxxx
(2)
(3)
6h. Load Data Low Byte(7)
0010011_iiiiiiii
xxxxxxx_xxxxxxxx
0110011_00000000
0110001_00000000
0110011_00000000
0110011_00000000
xxxxxxx_xxxxxxxx
xxxxxxx_xxxxxxxx
xxxxxxx_xxxxxxxx
xxxxxxx_xxxxxxxx
6i. Write Fuse Low Byte
(1)
6j. Poll for Fuse Write Complete
7a. Enter Lock Bit Write
7b. Load Data Byte(9)
0110011_00000000
0100011_00100000
0010011_11iiiiii
xxxxxox_xxxxxxxx
xxxxxxx_xxxxxxxx
xxxxxxx_xxxxxxxx
(2)
(4)
0110011_00000000
0110001_00000000
0110011_00000000
0110011_00000000
xxxxxxx_xxxxxxxx
xxxxxxx_xxxxxxxx
xxxxxxx_xxxxxxxx
xxxxxxx_xxxxxxxx
7c. Write Lock Bits
(1)
(2)
7d. Poll for Lock Bit Write complete
0110011_00000000
0100011_00000100
xxxxxox_xxxxxxxx
8a. Enter Fuse/Lock Bit Read
xxxxxxx_xxxxxxxx
0111010_00000000
0111011_00000000
xxxxxxx_xxxxxxxx
8b. Read Extended Fuse Byte(6)
8c. Read Fuse High Byte(7)
xxxxxxx_oooooooo
0111110_00000000
0111111_00000000
xxxxxxx_xxxxxxxx
xxxxxxx_oooooooo
363
2549L–AVR–08/07