attiny13-20ss ATMEL Corporation, attiny13-20ss Datasheet - Page 9

no-image

attiny13-20ss

Manufacturer Part Number
attiny13-20ss
Description
8-bit Microcontroller With 1k Bytes In-system Programmable Flash - Atmel Corporation
Manufacturer
ATMEL Corporation
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
attiny13-20ssI
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
attiny13-20ssJ
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
attiny13-20ssU
Quantity:
2 180
Company:
Part Number:
attiny13-20ssU
Quantity:
100
Company:
Part Number:
attiny13-20ssU
Quantity:
739
Part Number:
attiny13-20ssU-SL383
Manufacturer:
ATMEL
Quantity:
4 132
The X-register, Y-register, and
Z-register
Stack Pointer
2535G–AVR–01/07
The registers R26..R31 have some added functions to their general purpose usage.
These registers 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 5.
Figure 5. The X-, Y-, and Z-registers
In the different addressing modes these address registers have functions as fixed dis-
placement, 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 Regis-
ter always points to the top of the Stack. Note that the Stack is implemented as growing
from higher memory locations 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 Inter-
rupt Stacks are located. This Stack space in the data SRAM is automaticall defined to
the last address in SRAM during power on reset. The Stack Pointer must be set to point
above 0x60. 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 incre-
mented 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 num-
ber of bits actually used is implementation dependent. Note that the data space in some
implementations of the AVR architecture is so small that only SPL is needed. In this
case, the SPH Register will not be present.
X-register
Y-register
Z-register
Bit
Read/Write
Initial Value
R/W
SP7
15
7
1
15
7
R27 (0x1B)
15
7
R29 (0x1D)
15
7
R31 (0x1F)
SP6
R/W
14
6
0
SP5
R/W
13
5
0
XH
YH
ZH
0
SP4
R/W
12
4
1
SP3
R/W
11
3
1
0
0
R26 (0x1A)
R30 (0x1E)
7
7
R28 (0x1C)
7
R/W
SP2
10
2
1
SP1
R/W
9
1
1
XL
YL
ZL
0
SP0
R/W
8
0
1
SPL
0
0
0
0
0
9

Related parts for attiny13-20ss