Programming Command Register

The Programming Command Register is a 15-bit register. This register is used to serially shift in programming commands, and to serially shift out the result of the previous command, if any. The JTAG Programming Instruction Set is shown in the following table. The state sequence when shifting in the programming commands is illustrated in State Machine Sequence for Changing/Reading the Data Word further down in this section.

Figure 1. Programming Command Register
Table 1. JTAG Programming Instruction Set . 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
Instruction TDI sequence TDO sequence Notes
1a. Chip erase 0100011_10000000

0110001_10000000

0110011_10000000

0110011_10000000

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

 
1b. Poll for chip erase complete 0110011_10000000 xxxxxox_xxxxxxxx (2)
2a. Enter Flash Write 0100011_00010000 xxxxxxx_xxxxxxxx  
2b. Load Address High Byte 0000111_aaaaaaaa xxxxxxx_xxxxxxxx (9)
2c. Load Address Low Byte 0000011_bbbbbbbb xxxxxxx_xxxxxxxx  
2d. Load Data Low Byte 0010011_iiiiiiii xxxxxxx_xxxxxxxx  
2e. Load Data High Byte 0010111_iiiiiiii xxxxxxx_xxxxxxxx  
2f. Latch Data 0110111_00000000

1110111_00000000

0110111_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

(1)
2g. Write Flash Page 0110111_00000000

0110101_00000000

0110111_00000000

0110111_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

(1)
2h. Poll for Page Write complete 0110111_00000000 xxxxxox_xxxxxxxx (2)
3a. Enter Flash Read 0100011_00000010 xxxxxxx_xxxxxxxx  
3b. Load Address High Byte 0000111_aaaaaaaa xxxxxxx_xxxxxxxx (9)
3c. Load Address Low Byte 0000011_bbbbbbbb xxxxxxx_xxxxxxxx  
3d. Read Data Low and High Byte 0110010_00000000

0110110_00000000

0110111_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_oooooooo

xxxxxxx_oooooooo

low byte

high byte

4a. Enter EEPROM Write 0100011_00010001 xxxxxxx_xxxxxxxx  
4b. Load Address High Byte 0000111_aaaaaaaa xxxxxxx_xxxxxxxx (9)
4c. Load Address Low Byte 0000011_bbbbbbbb xxxxxxx_xxxxxxxx  
4d. Load Data Byte 0010011_iiiiiiii xxxxxxx_xxxxxxxx  
4e. Latch Data 0110111_00000000

1110111_00000000

0110111_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

(1)
4f. Write EEPROM Page 0110011_00000000

0110001_00000000

0110011_00000000

0110011_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

(1)
4g. Poll for Page Write complete 0110011_00000000 xxxxxox_xxxxxxxx (2)
5a. Enter EEPROM Read 0100011_00000011 xxxxxxx_xxxxxxxx  
5b. Load Address High Byte 0000111_aaaaaaaa xxxxxxx_xxxxxxxx (9)
5c. Load Address Low Byte 0000011_bbbbbbbb xxxxxxx_xxxxxxxx  
5d. Read Data Byte 0110011_bbbbbbbb

0110010_00000000

0110011_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_oooooooo

 
6a. Enter Fuse Write 0100011_01000000 xxxxxxx_xxxxxxxx  
6b. Load Data Low Byte(6) 0010011_iiiiiiii xxxxxxx_xxxxxxxx (3)
6c. Write Fuse Extended byte 0111011_00000000

0111001_00000000

0111011_00000000

0111011_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

(1)
6d. Poll for Fuse Write complete 0110111_00000000 xxxxxox_xxxxxxxx (2)
6e. Load Data Low Byte(7) 0010011_iiiiiiii xxxxxxx_xxxxxxxx (3)
6f. Write Fuse High byte 0110111_00000000

0110101_00000000

0110111_00000000

0110111_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

(1)
6g. Poll for Fuse Write complete 0110111_00000000 xxxxxox_xxxxxxxx (2)
6h. Load Data Low Byte(7) 0010011_iiiiiiii xxxxxxx_xxxxxxxx (3)
6i. Write Fuse Low byte 0110011_00000000

0110001_00000000

0110011_00000000

0110011_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

(1)
6j. Poll for Fuse Write complete 0110011_00000000 xxxxxox_xxxxxxxx (2)
7a. Enter Lock bit Write 0100011_00100000 xxxxxxx_xxxxxxxx  
7b. Load Data Byte(9) 0010011_11iiiiii xxxxxxx_xxxxxxxx (4)
7c. Write Lock bits 0110011_00000000

0110001_00000000

0110011_00000000

0110011_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

(1)
7d. Poll for Lock bit Write complete 0110011_00000000 xxxxxox_xxxxxxxx (2)
8a. Enter Fuse/Lock bit Read 0100011_00000100 xxxxxxx_xxxxxxxx  
8b. Read Extended Fuse Byte(6) 0111010_00000000

0111011_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_oooooooo

 
8c. Read Fuse High Byte(7) 0111110_00000000

0111111_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_oooooooo

 
8d. Read Fuse Low Byte(8) 0110010_00000000

0110011_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_oooooooo

 
8e. Read Lock bits(9) 0110110_00000000

0110111_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_xxoooooo

(5)
8f. Read Fuses and Lock bits 0111010_00000000

0111110_00000000

0110010_00000000

0110110_00000000

0110111_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_oooooooo

xxxxxxx_oooooooo

xxxxxxx_oooooooo

xxxxxxx_oooooooo

(5)

fuse ext. byte

fuse high byte

fuse low byte

lock bits

9a. Enter Signature Byte Read 0100011_00001000 xxxxxxx_xxxxxxxx  
9b. Load Address Byte 0000011_bbbbbbbb xxxxxxx_xxxxxxxx  
9c. Read Signature Byte 0110010_00000000

0110011_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_oooooooo

 
10a. Enter Calibration Byte Read 0100011_00001000 xxxxxxx_xxxxxxxx  
10b. Load Address Byte 0000011_bbbbbbbb xxxxxxx_xxxxxxxx  
10c. Read Calibration Byte 0110110_00000000

0110111_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_oooooooo

 
11a. Load No Operation Command 0100011_00000000

0110011_00000000

xxxxxxx_xxxxxxxx

xxxxxxx_xxxxxxxx

 
Note:
  1. This command sequence is not required if the seven MSB are correctly set by the previous command sequence (which is normally the case).
  2. Repeat until o = “1”.
  3. Set bits to “0” to program the corresponding fuse, “1” to unprogram the Fuse.
  4. Set bits to “0” to program the corresponding lock bit, “1” to leave the Lock bit unchanged.
  5. “0” = programmed, “1” = unprogrammed.
  6. The bit mapping for Fuses Extended byte is listed in Extended Fuse Byte table of Fuse Bits section.
  7. The bit mapping for Fuses High byte is listed in Fuse High Byte table of Fuse Bits section.
  8. The bit mapping for Fuses Low byte is listed in Fuse Low Byte table of Fuse Bits section.
  9. The bit mapping for Lock bits byte is listed in Lock Bit Byte table of Program and Data Memory Lock Bits section.
  10. Address bits exceeding PCMSB and EEAMSB (Command Byte Bit Coding in Signal Names section and Page Size section) are don’t care
Figure 2. State Machine Sequence for Changing/Reading the Data Word