144
ATtiny25/45/85 [DATASHEET]
2586Q–AVR–08/2013
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.
19.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:
19.7
Preventing Flash Corruption
During periods of low V
CC, the Flash program can be corrupted because the supply voltage is too low for the CPU
and the Flash to operate properly. These issues are the same as for board level systems using the Flash, and the
same design solutions should be applied.
A Flash program corruption can be caused by two situations when the voltage is too low. First, a regular write
sequence to the Flash requires a minimum voltage to operate correctly. Secondly, the CPU itself can execute
instructions incorrectly, if the supply voltage for executing instructions is too low.
Flash corruption can easily be avoided by following these design recommendations (one is sufficient):
1.
Keep the AVR RESET active (low) during periods of insufficient power supply voltage. This can be done
by enabling the internal Brown-out Detector (BOD) if the operating voltage matches the detection level. If
Bit
7
6
543
2
1
0
Rd
FEB7
FEB6
FEB5
FEB4
FEB3
FEB2
FEB1
FEB0
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<<RSIG)|(1<<SPMEN)
out
SPMCSR, r16
; Issue LPM. Table data will be returned into r17
lpm
r17, Z
ret