#include <AT89X51.H>
unsigned char code table1[]={0x06,0x5b,0x4f,0x66,0x6d}; //显示“012345”
unsigned char code table2[]={0x76,0x79,0x38,0x38,0x3f}; //显示“HELLO”
unsigned char i,j;
unsigned char a,b;
unsigned char temp;
void main(void)
{
while(1)
{
temp=0xfe;
for(i=0;i<5;i++)
{
if(P1_7==1)
{
P0=table2;
}
else
{
P0=table1;
}
P2=temp;
a=temp<<(i+1);
b=temp>>(7-i);
temp=a|b;
for(a=4;a>0;a--);
for(b=248;b>0;b--);
P2=0xff;
}
}
}
请问红色部分程序怎么理解啊,在整个程序中的作用是什么??
|