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

P89c51rd2 Ram Address problem

Dear all,
My project is using P89c51rd2 added an external ram(8k).
Accroding to the data sheet
the memory model of P89c51rd2 is that:

0-7f lower 128 byte
80-ff Higner 128 byte
100-3fff ERAM

-----------------------------
Extrnal 8K ram from 0000~1FFF.
------------------------------

if i connected the external ram to P89c51rd2
What is the starting address of the External RAM?

Will the Eram and external ram address overall together


if i want to use the XBYTE[] to acess the external ram address

How can i do it?

Parents
  • What is the starting address of the External RAM?
    depending on how it is wired, if no 'tricks', it is 0
    Will the Eram and external ram address overall work? together
    absolutely
    if i want to use the XBYTE[] to acess the external ram address
    XBYTE has nothing to do with ERAM/XRAM

    A dead simple soultion would be to switch to the P89C668 which is close to a RD2 with 8k RAM internal.


    The ERAM/XRAM selection is done in the AUXR. With external RAM attached, you must - if the memories overlap - set the EXTRAM bit to acces external memory, clear it to access internal.

    My solution would be to wire the external RAM to start at 0x8000 (include A15 in the chip select) and let the automatic "external when past the ERAM limit" take care of the switching. If you do not need more memory that your external RAM hold, just use XRAM only.

    Erik

Reply
  • What is the starting address of the External RAM?
    depending on how it is wired, if no 'tricks', it is 0
    Will the Eram and external ram address overall work? together
    absolutely
    if i want to use the XBYTE[] to acess the external ram address
    XBYTE has nothing to do with ERAM/XRAM

    A dead simple soultion would be to switch to the P89C668 which is close to a RD2 with 8k RAM internal.


    The ERAM/XRAM selection is done in the AUXR. With external RAM attached, you must - if the memories overlap - set the EXTRAM bit to acces external memory, clear it to access internal.

    My solution would be to wire the external RAM to start at 0x8000 (include A15 in the chip select) and let the automatic "external when past the ERAM limit" take care of the switching. If you do not need more memory that your external RAM hold, just use XRAM only.

    Erik

Children