I believe I'm doing something incorrectly, probably relating to how I initialize and tell keil where RAM memory resides at. I'm using the latest version of uVision and C compiler. The P89C668 has 8k of onboard RAM. As I understand it, the P89C668 has the normal 256 bytes of 'internal' RAM and the rest is accessed as XDATA. So once setting Keil up, I edit the startup such as:
IDATALEN EQU 100H XDATASTART EQU 101H XDATALEN EQU 2000H PDATASTART EQU 0H PDATALEN EQU 0H
unsigned char idata lcdbuf[2][16];
WriteLCD("Hello Keil\n", LCD_LINE1); WriteLCD("XDATA Prob\n", LCD_LINE2);
unsigned char xdata lcdbuf[2][16];
http://www.keil.com/support/docs/1978.htm Answered my own question. Thanks James
I guess you know the answer by now. I too stumbled upon this issue. All I had to do is to add one more line to startup.a51 code that was supplied by Keil. CSEG AT 0 ?C_STARTUP: LJMP STARTUP1 RSEG ?C_C51STARTUP STARTUP1: ; enable on-chip xdata RAM MOV AUXR1,#00H ; AUXR1/Bit 1 (clear to 0 to enable on-chip XRAM) This solved the problem.