#include
#define uint unsigned int
#define uchar unsigned char
uchar duan[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x83,0xc6,0xa1,0x86,0x8e,0x71,0x0e,0x00,0x0b,0x07};
// 0 1 2 3 4 5 6 7 8 9 A B C D E F 1 2 3 4
void delay(uint a)
{
while(a--);
}
main()
{
while(1)
{
P0=duan[0];
delay(500000);
P3=duan[18];
P0=duan[1];
delay(500000);
P3=duan[18];
P0=duan[2];
delay(500000);
P3=duan[18];
P0=duan[3];
delay(500000);
P3=duan[18];
P0=duan[4];
delay(500000);
P3=duan[18];
P0=duan[5];
delay(500000);
P3=duan[18];
P0=duan[6];
delay(500000);
P3=duan[18];
P0=duan[7];
delay(500000);
P3=duan[18];
P0=duan[8];
delay(500000);
P3=duan[18];
P0=duan[9];
delay(500000);
P3=duan[18];
P0=duan[10];
delay(500000);
P3=duan[18];
P0=duan[11];
delay(500000);
P3=duan[18];
P0=duan[0];
delay(500000);
P3=duan[18];
P0=duan[1];
delay(500000);
P3=duan[19];
P0=duan[2];
delay(500000);
P3=duan[19];
P0=duan[3];
delay(500000);
P3=duan[19];
P0=duan[4];
delay(500000);
P3=duan[19];
P0=duan[5];
delay(500000);
P3=duan[19];
P0=duan[6];
delay(500000);
P3=duan[19];
P0=duan[7];
delay(500000);
P3=duan[19];
P0=duan[8];
delay(500000);
P3=duan[19];
P0=duan[9];
delay(500000);
P3=duan[19];
P0=duan[10];
delay(500000);
P3=duan[19];
P0=duan[11];
delay(500000);
P3=duan[19];
}
}
/*smg(uint z,uint x);
smg(0,17);
delay(100000);
smg(1,17);
delay(100000);
smg(2,17);
delay(100000);*/
相关文章