This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SFR and Upper RAM memory?

The SFR area is between 0x80 and 0xFF, also the Upper RAM area is between 0x80 and 0xFF. I can access the SFR using direct addressing and the Upper RAM using indirect addressing. My question: are the SFR and Upper RAM physically 2 different memorys? If I use all of the SFR registers can I also use the Upper RAM memory (both have the same address area)? (overwrite data) data crash?
Thanks

Parents
  • MOVX selects XDATA memory from address 0 to 0xFFFF

    ... and just in case you were wondering where PDATA fits into all this:

    MOVX @DPTR gets its 16-bit (0..FFFF) XDATA address from the DPTR;
    MOVX @R0 or MOVX @R1 gets the low 8-bits (0..FF) R0 (or R1), and the high 8-bits from P2 - this is known as PDATA ('P' for "Paged")

    Thus PDATA and XDATA are not inherently separate memory spaces.

Reply
  • MOVX selects XDATA memory from address 0 to 0xFFFF

    ... and just in case you were wondering where PDATA fits into all this:

    MOVX @DPTR gets its 16-bit (0..FFFF) XDATA address from the DPTR;
    MOVX @R0 or MOVX @R1 gets the low 8-bits (0..FF) R0 (or R1), and the high 8-bits from P2 - this is known as PDATA ('P' for "Paged")

    Thus PDATA and XDATA are not inherently separate memory spaces.

Children