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
  • My question: are the SFR and Upper RAM physically 2 different memories?

    Yes.

    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?

    No, you will not crash. Just like when you do a movc from address 0x4000 you get what's in CODE (PROM) space not what's in XDATA space (SDRAM).

    MOV direct above address 0x7F selects the SFR memory map and since there are no SFR's below 0x80 Intel was nice enough to allow this access method to give us fast access to internal RAM.

    MOV indirect from 0 - 0xFF wil select the IDATA memory.

    MOVX selects XDATA memory from address 0 to 0xFFFF

    MOVC selects CODE memory from address 0 to 0xFFFF

    - Mark

Reply
  • My question: are the SFR and Upper RAM physically 2 different memories?

    Yes.

    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?

    No, you will not crash. Just like when you do a movc from address 0x4000 you get what's in CODE (PROM) space not what's in XDATA space (SDRAM).

    MOV direct above address 0x7F selects the SFR memory map and since there are no SFR's below 0x80 Intel was nice enough to allow this access method to give us fast access to internal RAM.

    MOV indirect from 0 - 0xFF wil select the IDATA memory.

    MOVX selects XDATA memory from address 0 to 0xFFFF

    MOVC selects CODE memory from address 0 to 0xFFFF

    - Mark

Children