
292
ATmega64A [DATASHEET]
8160D–AVR–02/2013
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
28.8.4
SPI Serial Programming Characteristics
28.9
Programming Via the JTAG Interface
Programming through the JTAG interface requires control of the four JTAG specific pins: TCK, TMS, TDI, and
TDO. Control of the reset and clock pins is not required.
To be able to use the JTAG interface, the JTAGEN Fuse must be programmed. The device is default shipped with
the fuse programmed. In addition, the JTD bit in MCUCSR must be cleared. Alternatively, if the JTD bit is set, the
External Reset can be forced low. Then, the JTD bit will be cleared after two chip clocks, and the JTAG pins are
available for programming. This provides a means of using the JTAG pins as normal port pins in running mode
while still allowing In-System Programming via the JTAG interface. Note that this technique can not be used when
using the JTAG pins for Boundary-scan or On-chip Debug. In these cases the JTAG pins must be dedicated for
this purpose.
As a definition in this data sheet, the LSB is shifted in and out first of all Shift Registers.
28.9.1
Programming Specific JTAG Instructions
The instruction register is 4-bit wide, supporting up to 16 instructions. The JTAG instructions useful for Program-
ming are listed below.
The OPCODE for each instruction is shown behind the instruction name in hex format. The text describes which
data register is selected as path between TDI and TDO for each instruction.
The Run-Test/Idle state of the TAP controller is used to generate internal clocks. It can also be used as an idle
state between JTAG sequences. The state machine sequence for changing the instruction word is shown in
FigureRead Extendend Fuse
Bits
0101 0000
0000 1000
xxxx xxxx
oooo oooo
Read Extended Fuse bits. “0” =
pro-grammed, “1” =
Read Fuse High Bits
0101 1000
0000 1000
xxxx xxxx
oooo oooo
Read Fuse high bits. “0” = pro-
grammed, “1” = unprogrammed.
details.
Read Calibration Byte
0011 1000
00xx xxxx
0000 00bb
oooo oooo
Read Calibration Byte o at address
b.
Table 28-15. SPI Serial Programming Instruction Set (Continued)
Instruction
Instruction Format
Operation
Byte 1
Byte 2
Byte 3
Byte 4