ATmega128
Stack Pointer
The Stack is mainly used for storing temporary data, for storing local variables and for storing
return addresses after interrupts and subroutine calls. The Stack Pointer Register always points
to the top of the Stack. Note that the Stack is implemented as growing from higher memory loca-
tions to lower memory locations. This implies that a Stack PUSH command decreases the Stack
Pointer.
The Stack Pointer points to the data SRAM stack area where the Subroutine and Interrupt
Stacks are located. This Stack space in the data SRAM must be defined by the program before
any subroutine calls are executed or interrupts are enabled. The Stack Pointer must be set to
point above $60. The Stack Pointer is decremented by one when data is pushed onto the Stack
with the PUSH instruction, and it is decremented by two when the return address is pushed onto
the Stack with subroutine call or interrupt. The Stack Pointer is incremented by one when data is
popped from the Stack with the POP instruction, and it is incremented by two when data is
popped from the Stack with return from subroutine RET or return from interrupt RETI.
The AVR Stack Pointer is implemented as two 8-bit registers in the I/O space. The number of
bits actually used is implementation dependent. Note that the data space in some implementa-
tions of the AVR architecture is so small that only SPL is needed. In this case, the SPH Register
will not be present.
Bit
15
14
13
12
11
10
9
8
SP15
SP7
7
SP14
SP6
6
SP13
SP5
5
SP12
SP4
4
SP11
SP3
3
SP10
SP2
2
SP9
SP1
1
SP8
SP0
0
SPH
SPL
Read/ W rite
Initial Value
R/ W
R/ W
0
0
R/ W
R/ W
0
0
R/ W
R/ W
0
0
R/ W
R/ W
0
0
R/ W
R/ W
0
0
R/ W
R/ W
0
0
R/ W
R/ W
0
0
R/ W
R/ W
0
0
RAM Page Z Select
Register – RAMPZ
Bit
Read/ W rite
Initial Value
7
R
0
6
––
R
0
5
R
0
4
R
0
3
R
0
2
R
0
1
R
0
0
RAMPZ0
R/ W
0
RAMPZ
? Bits 7..1 – Res: Reserved Bits
These are reserved bits and will always read as zero. W hen writing to this address location,
write these bits to zero for compatibility with future devices.
? Bit 0 – RAMPZ0: Extended RAM Page Z-pointer
The RAMPZ Register is normally used to select which 64K RAM Page is accessed by the Z-
pointer. As the ATmega128 does not support more than 64K of SRAM memory, this register is
used only to select which page in the program memory is accessed when the ELPM/SPM
instruction is used. The different settings of the RAMPZ0 bit have the following effects:
RAMPZ0 = 0:
RAMPZ0 = 1:
Program memory address $0000 - $7FFF (lower 64 Kbytes) is
accessed by ELPM/SPM
Program memory address $8000 - $FFFF (higher 64 Kbytes) is
accessed by ELPM/SPM
Note that LPM is not affected by the RAMPZ setting.
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.
13
2467X–AVR–06/11
相关PDF资料
ATMEGA64RZAPV-10AU BUNDLE ATMEGA644P/AT86RF230 TQFP
ATP101-TL-H MOSFET P-CH 30V 25A ATPAK
ATP102-TL-H MOSFET P-CH 30V 40A ATPAK
ATP103-TL-H MOSFET P-CH 30V 55A ATPAK
ATP104-TL-H MOSFET P-CH 30V 75A ATPAK
ATP106-TL-H MOSFET P-CH 40V 30A ATPAK
ATP107-TL-H MOSFET P-CH 40V 50A ATPAK
ATP108-TL-H MOSFET P-CH 40V 70A ATPAK
相关代理商/技术参数
ATMEGA128RFA1-ZUR SL514 制造商:Atmel Corporation 功能描述:
ATMEGA128RFA1-ZUR00 制造商:Atmel Corporation 功能描述:2.4GHZ 802.15.4 128K SOC REVF 制造商:Atmel Corporation 功能描述:2.4GHZ 802.15.4 128K SOC REVF T&R - Bulk 制造商:Atmel from Components Direct 功能描述:ATMEL ATMEGA128RFA1-ZUR00 MICROCONTROLLERS (MCU) 制造商:Atmel 功能描述:Atmel ATMEGA128RFA1-ZUR00 Microcontrollers (MCU) 制造商:Atmel Corporation 功能描述:MCU AVR 2.4GHZ 128K FLASH 64VQFN 制造商:Atmel Corporation 功能描述:2.4GHZ 802.15.4 128K SOC Revision F 制造商:Atmel 功能描述:2.4GHZ 802.15.4 128K SOC REVF
ATMEGA128RFR2-ZF 功能描述:IC RF TXRX+MCU 802.15.4 64-VFQFN 制造商:microchip technology 系列:- 包装:托盘 零件状态:在售 类型:TxRx + MCU 射频系列/标准:802.15.4 协议:Zigbee? 调制:DSSS, O-QPSK 频率:2.4GHz 数据速率(最大值):2Mbps 功率 - 输出:3.5dBm 灵敏度:-100dBm 存储容量:128kB 闪存,4kB EEPROM,16kB SRAM 串行接口:I2C,JTAG,SPI,USART GPIO:35 电压 - 电源:1.8 V ~ 3.6 V 电流 - 接收:5mA ~ 12.5mA 电流 - 传输:8mA ~ 14.5mA 工作温度:-40°C ~ 125°C 封装/外壳:64-VFQFN 裸露焊盘 标准包装:260
ATMEGA128RFR2-ZU 制造商:Atmel Corporation 功能描述:2.4GHZ 802.15.4 128K SOC IND 85C - Bulk
ATMEGA128RFR2-ZUR 制造商:Atmel Corporation 功能描述:2.4GHZ 802.15.4 128K SOC 85C T&R - Tape and Reel
ATMEGA128RZAV-8AU 功能描述:射频微控制器 - MCU AVR Z-Link Bundle RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:Si100x 数据总线宽度:8 bit 最大时钟频率:24 MHz 程序存储器大小:64 KB 数据 RAM 大小:4 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 85 C 封装 / 箱体:LGA-42 安装风格:SMD/SMT 封装:Tube
ATMEGA128RZAV-8MU 功能描述:射频微控制器 - MCU AVR Z-Link Bundle RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:Si100x 数据总线宽度:8 bit 最大时钟频率:24 MHz 程序存储器大小:64 KB 数据 RAM 大小:4 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 85 C 封装 / 箱体:LGA-42 安装风格:SMD/SMT 封装:Tube