Datasheet
147
8024A–AVR–04/08
ATmega8HVA/16HVA
26.3 Register Description
26.3.1 SPMCSR – Store Program Memory Control and Status Register
The Store Program Memory Control and Status Register contains the control bits needed to con-
trol the Program memory operations.
• Bits 7:6 – Res: Reserved Bits
These bits are reserved for future use.
For compatibility with future devices, these bits must be written to zero when SPMCSR is
written.
• Bit 5 – SIGRD: Signature Row Read
If this bit is written to one at the same time as SPMEN, the next LPM instruction within three
clock cycles will read a byte from the signature row into the destination register. See ”Reading
the Signature Row from Software” on page 144 for details.
An SPM instruction within four cycles after SIGRD and SPMEN are set will have no effect. This
operation is reserved for future use and should not be used.
• Bit 4 – CTPB: Clear Temporary Page Buffer
If the CTPB bit is written while filling the temporary page buffer, the temporary page buffer will be
cleared and the data will be lost.
• Bit 3 – RFLB: Read Fuse and Lock Bits
An LPM instruction within three cycles after RFLB and SPMEN are set in the SPMCSR Register,
will read either the Lock bits or the Fuse bits (depending on Z0 in the Z-pointer) into the destina-
tion register. See ”EEPROM Write Prevents Writing to SPMCSR” on page 143 for details.
PAG EM SB 5
Most significant bit which is used to address the
words within one page (64 words in a page requires
six bits PC [5:0]).
ZPCMSB Z13
Bit in Z-register that is mapped to PCMSB. Because
Z0 is not used, the ZPCMSB equals PCMSB + 1.
ZPAGEMSB Z6
Bit in Z-register that is mapped to PCMSB. Because
Z0 is not used, the ZPAGEMSB equals PAGEMSB +
1.
PCPAGE PC[12:6] Z13:Z7
Program Counter page address: Page select, for
Page Erase and Page Write
PCWORD PC[5:0] Z6:Z1
Program Counter word address: Word select, for
filling temporary buffer (must be zero during Page
Write operation)
Table 26-4. Explanation of different variables used in Figure 26-1 and the mapping to the Z-
pointer, ATmega16HVA.
Variable
Corresponding
Z-value Description
Bit 76543210
0x37 (0x57)
– – SIGRD CTPB RFLB PGWRT PGERS SPMEN SPMCSR
Read/Write R R R/W R/W R/W R/W R/W R/W
Initial Value00000000