Hi,
I am using AT89C51rd2. When I use big arrays like abc[270] and def[274] in my code, nothing works correct. But i use abc[40] and def[40], every thing is ok.
when abc[270] and def[274] declared, keil generates:
Program Size: data=109.1 xdata=1159 code=12696
when abc[40] and def[40] declared, keil generates:
Program Size: data=109.1 xdata=695 code=12461
In options, "use on-chip xram" is checked. I tried to set AUXR resiter in firmware like XRS0=0,XRS1=0,XRS2=1 to select "software selectable" xram size as 1792. Nothing is work....
What can be the problem???
Thanks...
Remember that nobody on this forum knows anything about your, or your project, or your hardware, or your software other than what you clearly and explicitly state in your posts.
If you can't find the problem when you have the code and the hardware right there in front of you, how do you expect anyone to do so without seeing or knowing anything about the hardware & software?
"So this means IC is not setuped correctly by MCU"
That's good - you've made a first step!
Now you need to investigate further to find why it's not getting set up correctly.
Again, with no access to your hardware or your software, nobody else can do this for you.
You haven't even said what IC it is, or how you set it up.
"No uart commands works"
Sorry, that's meaningless again!
You're back to, "My car doesn't work - what's wrong with it?"
What are these "UART commands"? What are they supposed to do? What do they actually do? What thinking & debugging have you done in an attempt to account for the difference?
"I tought many people get this type problems"
But we don't know exactly what type of problems you are having!
There's an almost infinite number of things that could cause stuff to "not work".
Again, think about "My car doesn't work - what's wrong with it?"; how many different things can you think of that would make a car "not work" - there must be hundreds!
"I think they understand the situation well"
Only if you explain it well!
You have identified that the presence/absence of "big arrrays" seems to affect this - so you need to investigate what, exactly, is different.
Have you tried this in the Simulator?
Here are some debugging tips & techniques:
www.8052.com/.../120313
www.techonlineindia.com/.../Developing_a_good_bedside_manner.aspx