ATA6602-PLQW ATMEL [ATMEL Corporation], ATA6602-PLQW Datasheet - Page 34

no-image

ATA6602-PLQW

Manufacturer Part Number
ATA6602-PLQW
Description
Microcontroller with LIN Transceiver, 5V Regulator and Watchdog
Manufacturer
ATMEL [ATMEL Corporation]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ATA6602-PLQW
Manufacturer:
ATMEL
Quantity:
1 727
Part Number:
ATA6602-PLQW
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
4.4.5.1
4.4.6
34
ATA6602/ATA6603
Stack Pointer
The X-register, Y-register, and Z-register
Most of the instructions operating on the Register File have direct access to all registers, and
most of them are single cycle instructions.
As shown in
mapping them directly into the first 32 locations of the user Data Space. Although not being
physically implemented as SRAM locations, this memory organization provides great flexibility in
access of the registers, as the X-, Y- and Z-pointer registers can be set to index any register in
the file.
The registers R26..R31 have some added functions to their general purpose usage. These reg-
isters are 16-bit address pointers for indirect addressing of the data space. The three indirect
address registers X, Y, and Z are defined as described in
Figure 4-4.
In the different addressing modes these address registers have functions as fixed displacement,
automatic increment, and automatic decrement (see the instruction set reference for details).
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 0x0100, preferably RAMEND. 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 incre-
mented by two when data is popped from the Stack with return from subroutine RET or return
from interrupt RETI.
X-register
Y-register
Z-register
Figure 4-3 on page
The X-, Y-, and Z-registers
15
7
R27 (0x1B)
15
7
R29 (0x1D)
15
7
R31 (0x1F)
33, each register is also assigned a data memory address,
XH
YH
ZH
0
0
0
Figure
XL
7
R26 (0x1A)
YL
7
R28 (0x1C)
ZL
7
R30 (0x1E)
4-4.
4921C–AUTO–01/07
0
0
0
0
0
0

Related parts for ATA6602-PLQW