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

P87C51MX on-chip EDATA & XDATA addresses

Hi every one,

The Philips 87C51MX user's manual indicated that the on-chip EDATA ranges from 0x100 to 0xffff; which followed the IDATA.

An article found in the Keil support knowledge base (CX51: LOCATING CODE IN PHILIPS MX INTERNAL CODE MEMORY) showed the following:

---------
User Classes:
EDATA (0x7F0000-0x7F04FF), /*on-chip RAM */

HCONST (0x810000-0x84FFFF) /*off-chip Flash for 'const far' */
---------

How does the "0x7f0000" become the starting address of on-chip EDATA? And where would the on-chip XDATA start?

Thanks.
Deyon

Parents
  • The 51MX has a lot of addressing modes (since it is an extension to the 8051). Many of these are the standard 8051 addressing modes.

    There are some new modes, however, that require more bytes to encode. These are less-efficient if you only need access to a 256-byte or 64K-byte range (like DATA or XDATA). The benefit of the new addressing modes is that the allow access to the entire 24-bit address space.

    The MX takes the 8051 harvard architecture (which is 128 bytes of SFR + 128 bytes of DATA/256 bytes of IDATA + 64K of XDATA + 64K of CODE) and "maps" it into a 16MB linear address space.

    This is what's causing so much confustion.

    You can think of the address space as follows:

    00:0000h-7F:FFFFh  RAM
    80:0000h-FF:FFFFh  ROM
    

    Or, put another way, if A23 is set, you are accessing CODE or CONSTANT information that is stored in non-volatile memory (FLASH, EEPROM, ROM, or EPROM). If A23 is not set, you are accessing variable information that is stored in volatile memory (RAM).

    The 16MB address map is as follows. Note that there are numerous sections and sub-sections to this thing.

    00:0000h-7F:FFFFh - HDATA (8 MB)
    ================================
    00:0000h-00:FFFFh - XDATA (64K - same as 8051)
    
    7F:0000h-7F:FFFFh - EDATA (64K)
    -------------------------------
    7F:0000h-7F:007Fh - DATA  (128 bytes - same as 8051)
    7F:0000h-7F:00FFh - IDATA (256 bytes - same as 8051)
    
    80:0000h-FF:FFFFh - ECODE (8 MB)
    ================================
    80:0000h-80:FFFFh - CODE (64K - same as 8051)
    
    

    Maybe this will help.

    This is covered pretty well in the assembler manual in the instruction set section.

    Jon

Reply
  • The 51MX has a lot of addressing modes (since it is an extension to the 8051). Many of these are the standard 8051 addressing modes.

    There are some new modes, however, that require more bytes to encode. These are less-efficient if you only need access to a 256-byte or 64K-byte range (like DATA or XDATA). The benefit of the new addressing modes is that the allow access to the entire 24-bit address space.

    The MX takes the 8051 harvard architecture (which is 128 bytes of SFR + 128 bytes of DATA/256 bytes of IDATA + 64K of XDATA + 64K of CODE) and "maps" it into a 16MB linear address space.

    This is what's causing so much confustion.

    You can think of the address space as follows:

    00:0000h-7F:FFFFh  RAM
    80:0000h-FF:FFFFh  ROM
    

    Or, put another way, if A23 is set, you are accessing CODE or CONSTANT information that is stored in non-volatile memory (FLASH, EEPROM, ROM, or EPROM). If A23 is not set, you are accessing variable information that is stored in volatile memory (RAM).

    The 16MB address map is as follows. Note that there are numerous sections and sub-sections to this thing.

    00:0000h-7F:FFFFh - HDATA (8 MB)
    ================================
    00:0000h-00:FFFFh - XDATA (64K - same as 8051)
    
    7F:0000h-7F:FFFFh - EDATA (64K)
    -------------------------------
    7F:0000h-7F:007Fh - DATA  (128 bytes - same as 8051)
    7F:0000h-7F:00FFh - IDATA (256 bytes - same as 8051)
    
    80:0000h-FF:FFFFh - ECODE (8 MB)
    ================================
    80:0000h-80:FFFFh - CODE (64K - same as 8051)
    
    

    Maybe this will help.

    This is covered pretty well in the assembler manual in the instruction set section.

    Jon

Children