#include<reg52.h>
#define uchar unsigned char
uchar i,j,z,tt,num;
uchar code table[]={
0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f,0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe,0x01
};
void delay(uchar z)
{
for(i=z;i>0;i--)
for(j=110;j>0;j--);
}
void main( )
{
while(1)
{
if(table!=0x01)
{
P1=table;
i++;
delay(200);
}
else
i=0;
}
}
我調試的時候,為什么P1一直是0xfe, 卻不讀0xfd,0xfd......
只想問明白這個點。
|