#include
sbit p10=P1^0;
main()
{unsigned char s[]={0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
unsigned char k,i=1;
unsigned char j;
unsigned char g=0x7f;
void delay();
unsigned char a,b,c;
while(1)
{for(i=0;i<8;i++)
{ j=i;
for(c=250;c>0;c--)
{ P3=g;
P0=s[j];
delay();
if(j==0) {j=i;g=0x7f;k=0;continue;}
j--;
g=(g>>1)+0x80;
k++;
} }
}
}
void delay()
{unsigned char a,b;
for(a=10;a>0;a--)
for(b=200;b>0;b--);}
本文引用地址:
http://m.butianyuan.cn/article/201611/320162.htm
評論