这是我用keil写的部分程序,明明没有错误为什么编译时总出现错误,提示如下图 5
#include<reg51.h>#defineucharunsignedcharuchartab[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0x...
#include<reg51.h>
#define uchar unsigned char
uchar tab[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};
void delay()
{
uchar i,j;
for(i=0;i<255;i++)
for(j=0;j<255;j++)
;
}
void main()
{
IE=0x85;TCON=0x5;
uchar i;
while(1)
{
for(i=0;i<8;i++)
{
P1=tab[i];
delay();
}
}
} 展开
#define uchar unsigned char
uchar tab[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};
void delay()
{
uchar i,j;
for(i=0;i<255;i++)
for(j=0;j<255;j++)
;
}
void main()
{
IE=0x85;TCON=0x5;
uchar i;
while(1)
{
for(i=0;i<8;i++)
{
P1=tab[i];
delay();
}
}
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询