Specifications

20
3706C–MICRO–2/11
AT89LP3240/6440
Figure 3-11. MOVX with One Wait State (WS =01B)
Figure 3-12. MOVX with Two Wait States (WS =10B)
Figure 3-13. MOVX with Three Wait States (WS =11B)
3.4 Extended Stack
The AT89LP3240/6440 provides an extended stack space for applications requiring additional
stack memory. By default the stack is loca ted in the 256-byte IDATA space of internal data
memory. The IDATA stack is referenced solely by the 8-b it Stack Pointer (SP: 81H). Setting the
XSTK bit in AUXR enables the extended stack. The extended stack resides in the EDATA spa
ce
for up to 4KB of stack memory. The extended stack is referenced by a 12-bit pointer formed from
SP and the four LSBs of the Extended Stack Pointer (SPX: 9EH) as shown in Figure 3-14. SP is
shared between both stacks. Note that the standard IDATA stack will not overflow to the EDATA
stack or vice versa. The stack and extended stack are mutua lly exclusive and SPX i
s ignored
when XTSK=0. An application choosing to switch between stacks by toggling XSTK must main-
S1 S2 S3 W1
CLK
ALE
WR
DPL OUTP0 SFR P0 SFR
P0
P2 SFR P2 SFRDPH or P2 OUT
P2
DATA OUT
S4
RD
DPL OUTP0 SFR P0 SFR
P0
FLOAT
S1 S2 S3 W1
CLK
ALE
WR
DPL OUTP0 SFR P0 SFR
P0
P2 SFR P2 SFRDPH or P2 OUT
P2
DATA OUT
W2
RD
DPL OUTP0 SFR P0 SFR
P0
FLOAT
S4
S1 S2 S3 W1
CLK
ALE
WR
DPL OUTP0 SFR P0 SFR
P0
P2 SFR P2 SFRDPH or P2 OUT
P2
DATA OUT
W2
RD
DPL OUTP0 SFR P0 SFR
P0
FLOAT
W3 S4