#include<reg51.h>
unsigned char code a[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};c[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f} ;
void timer();
void main (void)
{ int b,d;
for(d=0;d<8;d++)
{P2=c[d];
for(b=0;b<10;b++)
{ P0=a[b];
timer();
}
}
}
void tinterrupt 1
{ int M=0;
while(M<20)
{
TMOD = 0x01;
TL0 = 0xb0;
TH0 =0x3c;
EA=1;
ET0=1;
TR0=1;
if(TF0==1)
{ M++;
TF0 = 0;}
}
}
|