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

how to operate the 128byte page divided memory up to 1K in c51 like Hynix HMS9xc8032?

how to operate the 128byte page divided memory up to 1K in c51 like Hynix HMS9xc8032?
In HMS9xc8032,the data memory is divided into 8 page(2 SFR page),SFR is also have a little different with standard 8051,but in this web,support a reg52.h header file only.
So,anyone can tell us how to operate the data memory?Best is that someone can offer the source code or application notes.

Thanks and Best Regards!

  • I think your best bet is to look at the XBANKING memory support. I couldn't figure out from the data sheet if the additional DATA memory is indirectly addressable or not. If it isn't, then you can't use XBANKING--you'll have to figure something out on your own.

    The data sheet was pretty clear on how to switch data pages. Re-read the data sheet and it will be obvious.

    Jon

  • Hi Haif1,

    It seems possible by having different values in RDPG[2:0}(FCH) and WRPG[2:0}(FDH) to read/write data to different banks of data memory and that these banks are mapped into data space 0x00:0x7F but never having used DATA banking (hopefully the compiler will support this as I only thought Keil supported CODE/XRAM banking) I am not sure how you are going to be able to use this facility.

    A start may be to define some sfr's for these registers:-

    sfr RDPG = 0xFC;
    sfr WRPG = 0xFD;
    

    then maybe you can use something along the lines of:-

    RDPG = (RDPG & ~0x07) & NEW_BANK; /* mask off bank select bits then select required bank */
    

    and obviously something similar for the write bank, BUT assuming I have read the data sheet correctly any varaible(s) that you use to keep track of which read/write bank you are in need to be stored in IDATA/XDATA otherwise they will be inaccessible once the bank switch occurs.

    Mark.

  • Thank you for your reply!
    Should be my qustion is which data type can assign the data in keil c51 for this case?
    If write it in asm,there is OK according the data sheet.
    So,my question is how to assign the data type?Can you give us an example,please!


    Thanks!