Hi! I'm using Philips P89v51RD2FBC microcontroller. I build my project using Keil version 2.0. After compilation, total memory utillization is: Data: 155.2, Xdata: 327, Const: 2062, Code: 23176
Eventhough there is a free memory space in Data as well as in Xdata(MCU XRAM) memory, still I'm facing problems in accessing variables declared as "far" in MCU XRAM. i.e. the value of these variables get corrupted.
So, kindly help me in solving this problem.
Regards, Kshama.
"Also as you have mentioned earlier XRAM has to be enabled through SFR [...]"
It is time for you to start look closer at details. Andy did not say that XRAM _has_ to be enabled. He did write "if your chip requires [...]". Notice the conditional "if".
Not all chips needs any configuration to enable XRAM. And _if_ your specific chip needs it, then I would recommend you to read the datasheet for your specific chip. That document will contain the relevant information on how to turn on the XRAM. Maybe Keil already has a startup file with such initialization (IF it is needed), but you really should read up on your chip, so you know what happens.