at89c51re2-slsem ATMEL Corporation, at89c51re2-slsem Datasheet - Page 25

no-image

at89c51re2-slsem

Manufacturer Part Number
at89c51re2-slsem
Description
At89c51re2 8-bit Flash Microcontroller
Manufacturer
ATMEL Corporation
Datasheet
Extended Stack
7663B–8051–03/07
FFFFh
0000h
Logical MCU
Address
Standard C51 Stack mode EES = 0
FFh
00h
256 bytes
IRAM
XRAM
SP Value
FFh
00h
256 SP values
rollover within 256B of IRAM
The lowest bytes of the XRAM may be used to allow extension of the stack pointer.
The extended stack allows to extend the standard C51 stack over the 256 bytes of inter-
nal RAM. When the extended stack mode is activated (EES bit in AUXR1), the stack
pointer (SP) can grow in the lower 256 bytes of the XRAM area.
The stack extension consists in a 9 bits stack pointer where the ninth bit is located in
SP9 (bit 6 of AUXR1). The SP9 then indicates if the stack pointer belongs to the internal
RAM (SP9 cleared) or to the XRAM memory (SP9 set).
To ensure backward compatibility with standard C51 architecture, the extended mode is
disable at chip reset.
Figure 7. Stack modes
AUXR1 register
AUXR1- Auxiliary Register 1(0A2h)
Number
EES
Bit
7
7
6
Mnemonic Description
EES
SP9
SP9
Bit
6
Enable Extended Stack
This bit allows the selection of the stack extended mode.
Set to enable the extended stack
Clear to disable the extended stack (default value)
Stack Pointer 9th Bit
This bit has no effect when the EES bit is cleared.
Set when the stack pointer belongs to the XRAM memory space
Cleared when the stack pointer belongs to the 256bytes of internal RAM. Set and
cleared by hardware. Can only be read.
U2
5
FFFFh
00FFh
0000h
Logical MCU
Address
FFh
00h
Extended Stack mode Stack EES = 1
256 bytes
IRAM
XRAM
4
-
SP Value
FFh
FFh
00h
00h
GF2
3
SP9=1
SP9=0
2
0
512 SP Values
rollover in :
256B of IRAM
+
lower 256B of XRAM
1
-
DPS
0
25

Related parts for at89c51re2-slsem