Attiny43u – Rainbow Electronics ATtiny43U User Manual
Page 136

136
8048B–AVR–03/09
ATtiny43U
To read the Fuse High Byte (FHB), simply replace the address in the Z-pointer with 0x0003 and
repeat the procedure above. If successful, the contents of the destination register are as follows.
for detailed description and mapping of the Fuse High Byte.
To read the Fuse Extended Byte (FEB), replace the address in the Z-pointer with 0x0002 and
repeat the previous procedure. If successful, the contents of the destination register are as
follows.
Refer to
for detailed description and mapping of the Fuse Extended
Byte.
18.6.3
Reading Device Signature Imprint Table from Firmware
To read the contents of the device signature imprint table, follow the below procedure:
1.
Load the Z-pointer with the table index.
2.
Set RSIG and SPMEN bits in SPMCSR.
3.
Issue an LPM instruction within three clock cycles.
4.
Read table data from the LPM destination register.
See program example below.
Note:
See
If successful, the contents of the destination register are as described in section
ture Imprint Table” on page 141
Bit
7
6
5
4
3
2
1
0
Rd
FHB7
FHB6
FHB5
FHB4
FHB3
FHB2
FHB1
FHB0
Bit
7
6
5
4
3
2
1
0
Rd
FEB7
FEB6
FEB5
FEB4
FEB3
FEB2
FEB1
FEB0
Assembly Code Example
DSIT_read:
; Uses Z-pointer as table index
ldi
ZH, 0
ldi
ZL, 1
; Preload SPMCSR bits into R16, then write to SPMCSR
ldi
r16, (1< out SPMCSR, r16 ; Issue LPM. Table data will be returned into r17 lpm r17, Z ret