278
7530J–AVR–03/12
Atmel ATmega48/88/168 Automotive
Note:
1. Z15:Z14: always ignored
Z0: should be zero for all SPM commands, byte select for the LPM instruction.
Z-pointer during Self-Programming.
25. Memory Programming
25.1
Program And Data Memory Lock Bits
The ATmega88/168 provides six Lock bits which can be left unprogrammed (“1”) or can be pro-
grammed (“0”) to obtain the additional features listed in
Table 25-2. The Lock bits can only be
erased to “1” with the Chip Erase command.The ATmega48 has no separate Boot Loader sec-
tion. The SPM instruction is enabled for the whole Flash if the SELFPRGEN fuse is programmed
(“0”), otherwise it is disabled.
Notes:
1. “1” means unprogrammed, “0” means programmed
2. Only on ATmega88/168.
PAGEMSB
5
Most significant bit which is used to address
the words within one page (64 words in a page
requires 6 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 PAGEMSB.
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 24-11. Explanation of Different Variables used in Figure 24-3 and the Mapping to the
Z-pointer, ATmega168
Variable
Corresponding
Z-value(1)
Description
Table 25-1.
Lock Bit Byte
Bit No
Description
Default Value
7
–
1 (unprogrammed)
6
–
1 (unprogrammed)
5
Boot Lock bit
1 (unprogrammed)
4
Boot Lock bit
1 (unprogrammed)
3
Boot Lock bit
1 (unprogrammed)
2
Boot Lock bit
1 (unprogrammed)
LB2
1
Lock bit
1 (unprogrammed)
LB1
0
Lock bit
1 (unprogrammed)