at86rf401 ATMEL Corporation, at86rf401 Datasheet - Page 44

no-image

at86rf401

Manufacturer Part Number
at86rf401
Description
Smart Rf Wireless Data Microtransmitter
Manufacturer
ATMEL Corporation
Datasheet
The Stack Pointer – SP
The Status Register – SREG
44
Initial Value
Read/Write
Initial Value
Read/Write
AT86RF401
$3F
$3D
$3E
Bit
Bit
R/W
R/W
SP7
15
R
7
0
7
0
0
I
R/W
SP6
14
R
6
0
0
R/W
The Stack Pointer is implemented as two 8-bit registers in the I/O space locations $3E
($5E) and $3D ($5D). Caution: As the data memory has 224 locations, only 8 bits are
used and the SPH register must be programmed to 0 x 00.
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 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 and 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 status register – SREG – at I/O space location $3F is defined as:
• Bit[7] – I: Global Interrupt Enable
The global interrupt enable bit must be set (“1”) for the interrupts to be enabled. The
individual interrupt enable control is then performed in the interrupt mask registers
(GIMSK/TIMSK). If the global interrupt enable register is cleared (“0”), none of the inter-
rupts are enabled, independent of the GIMSK/TIMSK values. The I-bit is cleared by
hardware after an interrupt has occurred and is set by the RETI instruction to enable
subsequent interrupts.
• Bit[6] – T: Bit Copy Storage
The bit copy instructions BLD (Bit LoaD) and BST (Bit STore) use the T-bit as source
and destination for the operated bit. A bit from a register in the register file can be copied
into T by the BST instruction, and a bit in T can be copied into a bit in a register in the
register file by the BLD instruction.
• Bit[5] – H: Half Carry Flag
The half carry flag H indicates a half carry in some arithmetic operations. See Figure 10
on page 21 for detailed information.
6
T
0
SP5
R/W
13
R
5
0
0
R/W
H
5
0
R/W
SP4
12
R
4
0
0
R/W
S
4
0
SP3
R/W
11
R
3
0
0
R/W
V
3
0
SP10
SP2
R/W
R/W
10
2
0
0
R/W
N
2
0
SP9
SP1
R/W
R/W
9
1
0
0
R/W
1
Z
0
R/W
R/W
SP8
SP0
8
0
0
0
1424F–RKE–12/03
R/W
SPH
SPL
C
0
0

Related parts for at86rf401