This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

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);
}
}
}

0