
14
8011Q–AVR–02/2013
ATmega164P/324P/644P
4.5.1
SPH and SPL – Stack Pointer High and Stack pointer Low
Note:
1. Initial values respectively for the ATmega164P/324P/644P.
4.5.2
RAMPZ – Extended Z-pointer Register for ELPM/SPM
For ELPM/SPM instructions, the Z-pointer is a concatenation of RAMPZ, ZH, and ZL, as shown
in
Figure 4-4. Note that LPM is not affected by the RAMPZ setting.
Figure 4-4.
The Z-pointer used by ELPM and SPM
The actual number of bits is implementation dependent. Unused bits in an implementation will
always read as zero. For compatibility with future devices, be sure to write these bits to zero.
4.6
Instruction Execution Timing
This section describes the general access timing concepts for instruction execution. The AVR
CPU is driven by the CPU clock clk
CPU, directly generated from the selected clock source for the
chip. No internal clock division is used.
by the Harvard architecture and the fast-access Register File concept. This is the basic pipelin-
ing concept to obtain up to 1 MIPS per MHz with the corresponding unique results for functions
per cost, functions per clocks, and functions per power-unit.
Bit
151413121110
9
8
–
SP12
SP11
SP10
SP9
SP8
SPH
SP7
SP6
SP5
SP4
SP3
SP2
SP1
SP0
SPL
765
432
10
Read/Write
R
R/W
Initial Value
0
0/1/0
1/0/0
00
111
11
Table 4-2.
Stack Pointer size
Device
Stack Pointer size
ATmega164P
SP[10:0]
ATmega324P
SP[11:0]
ATmega644P
SP[12:0]
Bit
7
65432
1
0
RAMPZ7
RAMPZ6
RAMPZ5
RAMPZ4
RAMPZ3
RAMPZ2
RAMPZ1
RAMPZ0
RAMPZ
Read/Write
R/W
Initial Value
0
00000
0
Bit (Individually)
7
0
7
0
7
0
RAMPZ
ZH
ZL
Bit (Z-pointer)
23
16
15
8
7
0