#include<reg52.h>
#define LED P1
typedef unsigned int uint;
typedef unsigned char uchar;
int A[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};
void main()
{
int i;
uint j;
LED=0xff;
while(1)
{
for(i=0;i<10;i++)
{ LED=A[i];
for(j=50000;j>0;j--);
LED=0xff;
}
}
}
|