为什么这个数组延时不能循环?请问高手是哪里出错了。
#include<reg51.h>void delay(unsigned int i);
unsigned char dis[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};
void main(void)
{unsigned char i;
while(1)
{
for(i=0;i<8;i++)
{P1=dis[i];
delay(10);
}
}
}
void delay(unsigned int i)
{
unsigned int j;
for(;i!=0;i--)
for(j=3000;j!=0;i--)
;
}