|
#include
#include
unsigned char code dis_code[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};
unsigned char data dis_index;
void delayms(unsigned char ms)
{
unsigned char i;
while(ms--)
{
for(i = 0; i < 120; i++);
}
}
void main
dis_index = ()
{
int i j k; 0xfe;
while(1)
{
for(k=0;k<50;k++)
for(i=0;i<8;i++)
{
P2 = dis_index;
P0 = dis_code([i+k]%10);
delayms(2);
dis_index = _crolh_(dis_index, 1);
}
k++
}
}
0`9数字的移动 可以参照 |
|