Hello Everyone, I am writing code for Phillips P89V51RD2 controller. My problem is that when I try to write something like "char IMGdb[900]" , it shows error saying "main : Auto Segment too Large" . Why is this error occuring ? Because, in P89V51RD2, it has a 1 KB RAM, so there should be no problem.
By "work", I meant that whether I will be able to access the memory or not.... I am assuming that the 768 byte memory that I was talking about is the on-chip (XRAM) and can be accessed by defining it as "xdata". But, neway, I will now to load the program to see if it works... :)
Thank you for your reply, Dhaval Mehta mehtadhaval.blogspot.com
Don't assume - check for certain in the Datasheet!
(although, it must be admitted, some datasheets could be much clearer on this issue).
I don't specifically know this chip, and don't have its datasheet to hand to check, but you are most probably correct.
You also need to check the Datasheet to see if there is any configuration that you need to set up (SFRs, etc) before using this memory - if there is, you will need to put it into your startup file before anything makes any attempt to access it
http://www.keil.com/support/man/docs/c51/c51_ap_startup.htm
Yeah, there are some values to be written to Particular SFRs. It is mentioned in datasheet. I will do that.
Yeah, there are some values to be written to Particular SFRs. It is mentioned in datasheet. I will do that. do it in the right place: (a renamed copy of) startup.a51.
doing it in main() will not lead to the expected results
Erik
"doing it in main() will not lead to the expected results"
Depends on view - it would lead to the results you and I would expect ;)
:)