I am using a P89C669 and I am confused about the internal SRAM. The data sheets say there is 2K of on-board static RAM but the user manual shows that only 768 bytes in the on board XDATA space. However if a P89C669 device is selected as the target processor the dialog box shows a check box labelled "Use On chip XRAM 0x00- 0x6FF" What's the story or is my brain finally going to mush?
XDATA #include <REG668.H> #define on_XRAM() AUXR = 0x01 #define off_XRAM() AUXR = 0x02 sbit Led_Bit = P2^4; void delay(unsigned long us) { off_XRAM(); while (--us > 0); on_XRAM(); } void main(void) { #define POZ 4000 char xdata i[4300]; on_XRAM(); i[POZ] = 100; for (;;) { if (i[POZ] == 100) { Led_Bit = 1; delay(40000); Led_Bit = 0; delay(40000); } } }