I am using AT89C51RD2 with KEIL and Proteus VSM 7.1 SP2. The problem i am facing is: I am using "Small" memory model for AT89S52 (256 bytes RAM). Due to Address Overflow (Lot of variables), now I am using AT89C51RD2 (256 + 1792 bytes on-chip XRAM) So i have selected "Compact" memory model to use XRAM. Now Compiler Side there is no problem, Keil succesfully Creates HEX files. But when i am simulating this hex file with Proteus there is Blank Display and nothing at all.
Proteus Simulation log gives message: [HD44780]Controller received data whilst busy.
What is the problem ?
Same code creates this problem if "Compact" memory model is selected.
Please Help !
Selecting the compact model does not make sense in most cases.
if you stay with 'small' and add the xdata qualifier to some rarely used variables you will get a much better performance.
AT89S52 .... now I am using AT89C51RD2 I do not know (what) Proteus (is) but could it be that (your version of) Proteus does not 'know' the RD2. If you try what I sugest above, you will soon find out if it is the chip or the 'compact' model.
Erik
"So i have selected 'Compact' memory model to use XRAM."
No, you don't need to change the memory model at all.
The memory model simply specifies the default memory spaces - so all you need to do is to add the 'xdata' specifier to those variables that you specifically want to put into XDATA
"i am simulating this hex file with Proteus "
Proteus is not a Keil product - you need to contact Proteus support!
"What is the problem ?"
It is completely impossible to tell, as you've given absolutely no details of what your system is trying to do, how this display is connected to the controller, etc, etc...
Note that the Compact model actually uses PDATA:
http://www.keil.com/support/man/docs/c51/c51_le_modelcompact.htm
http://www.keil.com/support/docs/1848.htm
Are you sure your system is correctly configured for PDATA?
Thank You Very Much Erik! and Andy! for help. 'xdata' specifier is working, Now Proteus simulating very well.
Thanx again.
"Now Proteus simulating very well."
It was probably simulating very well all the time!
Quite possibly, your PDATA was not correctly configured, and the simulator was faithfully simulating the resulting problems!
Anyhow, good luck with the rest of the project...