Datasheet

229
ATtiny828 [DATASHEET]
8371A–AVR–08/12
22.3.1 Signature Bytes
All Atmel microcontrollers have a three-byte signature code which identifies the device. This code can be read in both
serial and parallel mode, also when the device is locked.
Signature bytes can also be read by the device firmware. See section “Reading Lock, Fuse and Signature Data from
Software” on page 229.
The three signature bytes reside in a separate address space called the device signature imprint table. The signature
data for ATtiny828 is given in Table 93.
Table 93. Device Signature Bytes
22.3.2 Calibration Bytes
The device signature imprint table of ATtiny828 contains calibration data for the internal oscillators, as shown in Table 92
on page 228. During reset, calibration data is automatically copied to the calibration registers (OSCCAL0, OSCCAL1) to
ensure correct frequency of the calibrated oscillators. See “OSCCAL0 – Oscillator Calibration Register” on page 32, and
“OSCCAL1 – Oscillator Calibration Register” on page 33.
Calibration bytes can also be read by the device firmware. See section “Reading Lock, Fuse and Signature Data from
Software” on page 229.
22.4 Reading Lock, Fuse and Signature Data from Software
Fuse and lock bits can be read by device firmware. Programmed fuse and lock bits read zero. unprogrammed as one.
See “Lock Bits” on page 225 and “Fuse Bits” on page 226.
In addition, firmware can also read data from the device signature imprint table. See “Device Signature Imprint Table” on
page 228.
22.4.1 Lock Bit Read
Lock bit values are returned in the destination register after an LPM instruction has been issued within three CPU cycles
after RWFLB and SPMEN bits have been set in SPMCSR (see page 223). The RWFLB and SPMEN bits automatically
clear upon completion of reading the lock bits, or if no LPM instruction is executed within three CPU cycles, or if no SPM
instruction is executed within four CPU cycles. When RWFLB and SPMEN are cleared LPM functions normally.
To read the lock bits, follow the below procedure:
1. Load the Z-pointer with 0x0001.
2. Set RWFLB and SPMEN bits in SPMCSR.
3. Issue an LPM instruction within three clock cycles.
4. Read the lock bits from the LPM destination register.
If successful, the contents of the destination register are as follows.
See section “Lock Bits” on page 225 for more information.
Part Signature Byte 0 Signature Byte 1 Signature Byte 0
ATtiny828 0x1E 0x93 0x14
Bit 76543210
Rd BLB12 BLB11 BLB02 BLB01 LB2 LB1