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

external memory interface

hello everyone,
i am using 89c51 interfacing with 6264

in 89c51 we have ram = 4Kbyte i.e for the further size i need to switch to 6264

total address line on 6264= 12
so A15=/CS1=0
A14=CS2=1
A13= gnd=0
A0-A7 = P0.0 to P0.7 of 89c51 trough latch
A8-A12 = P2.0 to P2.4 of 89c51
D0-D7=P1 for data
/WE = /we of 89c51
/RD = /Rd of 89c51
ALE connected to clk of latch
this is my hardware

now i have sstarted programming in c
i am using _at_ for the address
what all care i should take to select 6264
i have taken care of A15,A14,A13 and ALE
can u show me sample code for it
4000 is intermal ram and for external it is 4001 address
what if i select 4000 for external ram, does it conflict with internal ram
as soon as i transfer address does data is passed immediately?
thank u in advance
for further inputs from me pls let me konw

Parents
  • hello;
    thanx for replay
    i tried small program in c
    can you tell me how to differentiate between on-chip ram and off-chip external ram
    i.e if int ram address is =0000 to 3fff then for address 4000 will be diverted to external off-chip ram
    does this happen automatically? or we have to write code for it?
    what is differnce between:
    volatile unsigned char xdata ADD1 _at_ 0x4000
    and unsigned char xdata ADD2 _at_ 0x4000
    i tried this and i got warning as xdata space memory overlap
    is there any conflict if we enter same address for both on-chip and off-chip external ram
    please,correct me if i am wrong
    thank you all

Reply
  • hello;
    thanx for replay
    i tried small program in c
    can you tell me how to differentiate between on-chip ram and off-chip external ram
    i.e if int ram address is =0000 to 3fff then for address 4000 will be diverted to external off-chip ram
    does this happen automatically? or we have to write code for it?
    what is differnce between:
    volatile unsigned char xdata ADD1 _at_ 0x4000
    and unsigned char xdata ADD2 _at_ 0x4000
    i tried this and i got warning as xdata space memory overlap
    is there any conflict if we enter same address for both on-chip and off-chip external ram
    please,correct me if i am wrong
    thank you all

Children
  • You will have to study the Datasheet to answer that!

    It depends on the chip, and how you configure it!

    what is differnce between:

    volatile unsigned char xdata ADD1 _at_ 0x4000
    

    and

             unsigned char xdata ADD2 _at_ 0x4000
    


    The difference is, obviously, that one contains 'volatile' and the other doesn't!

    'volatile' is a standard 'C' keyword - so you can look it up in any 'C' textbook.

    "i tried this and i got warning as xdata space memory overlap"

    Of course you did!
    If you define two things at the same address then they will, by definition, overlap - won't they?!