ATmega48/88/168
ATmega168 Boot Loader
Parameters
In Table 112 through Table 114, the parameters used in the description of the self pro-
gramming are given.
Table 112. Boot Size Configuration, ATmega168
Boot Reset
Boot
Loader
Flash
Address
(Start Boot
Loader
Application
Flash
Section
End
Application
Section
Boot
Size
BOOTSZ1
BOOTSZ0
Pages
Section
Section)
128
words
0x0000 -
0x1F7F
0x1F80 -
0x1FFF
1
1
2
0x1F7F
0x1EFF
0x1DFF
0x1BFF
0x1F80
0x1F00
0x1E00
0x1C00
256
words
0x0000 -
0x1EFF
0x1F00 -
0x1FFF
1
0
0
0
1
0
4
8
512
words
0x0000 -
0x1DFF
0x1E00 -
0x1FFF
1024
words
0x0000 -
0x1BFF
0x1C00 -
0x1FFF
16
Note:
The different BOOTSZ Fuse configurations are shown in Figure 117.
Table 113. Read-While-Write Limit, ATmega168
Section
Pages
112
Address
Read-While-Write section (RWW)
No Read-While-Write section (NRWW)
0x0000 - 0x1BFF
0x1C00 - 0x1FFF
16
For details about these two section, see “NRWW – No Read-While-Write Section” on
page 256 and “RWW – Read-While-Write Section” on page 256
Table 114. Explanation of Different Variables used in Figure 118 and the Mapping to
the Z-pointer, ATmega168
Corresponding
Variable
Z-value(1)
Description
PCMSB
12
5
Most significant bit in the Program Counter.
(The Program Counter is 12 bits PC[11:0])
Most significant bit which is used to address the
words within one page (64 words in a page
requires 6 bits PC [5:0])
PAGEMSB
ZPCMSB
Z13
Z6
Bit in Z-register that is mapped to PCMSB.
Because Z0 is not used, the ZPCMSB equals
PCMSB + 1.
ZPAGEMSB
Bit in Z-register that is mapped to PAGEMSB.
Because Z0 is not used, the ZPAGEMSB
equals PAGEMSB + 1.
PCPAGE
PC[12:6]
PC[5:0]
Z13:Z7
Z6:Z1
Program counter page address: Page select,
for page erase and page write
PCWORD
Program counter word address: Word select, for
filling temporary buffer (must be zero during
page write operation)
Note:
1. Z15:Z14: always ignored
Z0: should be zero for all SPM commands, byte select for the LPM instruction.
See “Addressing the Flash During Self-Programming” on page 261 for details about
the use of Z-pointer during Self-Programming.
269
2545D–AVR–07/04