#include<reg52.h>
#define uchar unsigned char
uchar i,j,count;
uchar table[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};
sbit clk164=P0^7;
sbit data164=P0^6;
sbit P0_0=P0^0;
sbit P0_1=P0^1;//位码
delay()
{
for(i=20;i>0;i--)
for(j=248;i>0;i--)
;
}//延时程序
void display(unsigned char a)
{
uchar i;
for(i=0;i<8;i++)
{
a=a<<1;
data164=CY;
clk164=0;
clk164=1;
}
}
main()
{
while(1)
{ for(x=0;x<10;x++)
for(count=0;count<10;count++)
{
for(y=0;y<50;y++){
P0^0=0;
display(table[x]);
delay();
P0^0=1;
P0^1=0;
display(table[count]);
delay();
P0^1=1;
}
}
}
}