缩了一下最少的控制程序如下:
#include <reg52.h>
#define uchar unsigned char
#define uint unsigned int
uchar code FFW[8]={0xf1,0xf3,0xf2,0xf6,0xf4,0xfc,0xf8,0xf9};
//uchar code FFZ[8]={0xf9,0xf8,0xfc,0xf4,0xf6,0xf2,0xf3,0xf1};
void delay(uint z)
{
uint x;
uchar y;
for(x=z;x>0;x--)
for(y=110;y>0;y--);
}
void main()
{
while(1)
{
for(i=0;i<9;i++)
{if(i==8) i=0;
P0= FFW[i];
delay(10);}
}
}
#include <reg52.h>
#define uchar unsigned char
#define uint unsigned int
uchar code FFW[8]={0xf1,0xf3,0xf2,0xf6,0xf4,0xfc,0xf8,0xf9};
//uchar code FFZ[8]={0xf9,0xf8,0xfc,0xf4,0xf6,0xf2,0xf3,0xf1};
void delay(uint z)
{
uint x;
uchar y;
for(x=z;x>0;x--)
for(y=110;y>0;y--);
}
void main()
{
while(1)
{
for(i=0;i<9;i++)
{if(i==8) i=0;
P0= FFW[i];
delay(10);}
}
}