大吓门帮我看看这个程序;
#include<AT89X51.H>
#include<intrins.h>
unsigned char code teble1[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d};
unsigned char code teble2[]={0x76,0x79,0x38,0x38,0x3f,0x00};
unsigned char i;
unsigned char a;
unsigned char b;
unsigned char temp;
void main(void)
{
while(1)
{
temp=0xfe;
for(i=0;i<6;i++)
{
if(P1_7==1)
{
P0=teble1;
P0=teble1;
P0=teble1;
}
else
{
P0=teble2;
P0=teble2;
P0=teble2;
}
P2=temp;
temp=_crol_(temp,1);
for(a=4;a>0;a--)
for(b=248;b>0;b--);
}
}
}
运行结果;
调式了好久还是这种现象,就是不显示012345;本人现在黔驴技穷了,求各位高手相助。 |