Quantcast
Viewing all articles
Browse latest Browse all 36216

Re: ADuC836

I look datasheet and I think maybe your don't have memory for stack. Plese look page 14 (and 13) datasheet.

The upper 1792 bytes of the internal XRAM can be configured

to be used as an extended 11-bit stack pointer. By default, the

stack will operate exactly like an 8052 in that it will roll over from

FFH to 00H in the general-purpose RAM. On the ADuC836

however, it is possible (by setting CFG836.7) to enable the 11-bit

extended stack pointer. In this case, the stack will roll over from

FFH in RAM to 0100H in XRAM. The 11-bit stack pointer is

visible in the SP and SPH SFRs. The SP SFR is located at 81H

as with a standard 8052. The SPH SFR is located at B7H. The

3 LSBs of this SFR contain the three extra bits necessary to

extend the 8-bit stack pointer into an 11-bit stack pointer. (Figure 4. Extended Stack Pointer Operation).

 

So result:

The 2 Kbytes of internal XRAM are mapped into the

bottom 2 Kbytes of the external address space if the CFG836.0

bit is set and CFG836.7 to enable the 11-bit

extended stack pointer.

 

Note:

The lower 128 bytes of

RAM can be accessed through direct or indirect addressing; the

upper 128 bytes of RAM can only be accessed through indirect

addressing as it shares the same address space as the SFR space,

which can only be accessed through direct addressing.


Viewing all articles
Browse latest Browse all 36216

Trending Articles