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?
Hi, I am a beginner using Keil C51 complier. I have the same question: My program works with an xdata array within the 1K on-chip RAM [ERAM] and now I have 32K static RAM (62256) board connected to the P89C51RD2. When I declare the SAME xdata array to a larger size that goes beyond the 1K on-chip ERAM, the program can't work. Any advice as to how I can access external RAM? Kind regards, Simon PS Hi Raul, do you have an answer for your question now? Your reply is very much appreciated. Thanking you in advance.
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
Erik, Thanks for your quick response. Your advice is very much appreciated. Kind regards, Simon