Datasheet

183
8246B–AVR–09/11
ATtiny2313A/4313
4. Wait three clock cycles for SPMEN bits to be cleared.
5. Read table data from the LPM destination register.
If successful, the contents of the destination register are as described in section “Device Signa-
ture Imprint Table” on page 180.
The RSIG and SPMEN bits will auto-clear after three CPU cycles. When RSIG and SPMEN are
cleared, LPM will work as described in the “AVR Instruction Set” description.
See program example below.
Note: See “Code Examples” on page 7.
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<<RSIG)|(1<<SPMEN)
out SPMCSR, r16
; Issue LPM. Table data will be returned into r17
lpm r17, Z
ret