Hi!
XDATA is not working properly in P89v664 microcontroller.It is compiling well but in target board not showing result. but same program (using XDATA)working for p89v51rd .
Here we are using Flash magic version 4.24
Please suggest me to solve this problem.
with regards, mani
Suggests that you sprinkle your post with more facts.
What isn't working. How have you configured the project. What does your code look like...
Your struggle matches an issue I recall having on a project using the P89C66x device. At the time I recorded these project notes:-
"The P89C66x has extended RAM which maps to XRAM but is not enabled on boot. The EXTRAM bit of SFR AUXR (0x8E) needs to be cleared."
example code:
#include<p89v66x.h> #include<sbc.h>
xdata unsigned char *c ="ELECT";
void main() {
init_lcd(); AUXR = 0x03; while(1) { write(0x80,0); printlcd(c); } }
Actual project code I am not giving here, but for clarifying my doubt am sending example code i.e displaying string of characters to 16x2 LCD display. The above code is working without XDATA .But I need 1.2KB data memory.thats wat I want to use XDATA .Already I used regulary for p89v51rd series.But I didn’t face any problem .Using p89v664 only problem coming.
anybody Please tell me the solution
Somebody please don't nag.
You haven't shown enough code.
Does your function printlcd() expect a pointer to xdata text or exactly what pointer type does it expect?
If you think your LCD code is secret, or too much noise to present: Create a small sample without the LCD code then - for example a dummy printlcd() function that computes the length and checksum of the string it receives. If your real printlcd() function fails with xdata, then such a dummy function should also fail. In this case, we can't see how your printlcd() function is declared, or how it uses the pointer it receives as a parameter.
Have you separated the two cases where you have the pointer stored in xdata, and when it points to text stored in xdata?
Hi Per Westermark!
my printlcd code:
void printlcd(unsigned char *str) { while(*str) //till string ends write(*str++,1); //send characters one by one }
Carefully look at my first response - in particular the bit about EXTRAM needing to be cleared.
Oops - must withdraw my comments. Unlike the P89C66x series, the P98V66x series requires EXTRAM to be set!
Sorry for leaping before looking.