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!

Parents
  • 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.

Reply
  • 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.

Children
No data