我有个程序,不过是0~9 你可以修改下:
#include
unsigned char code1[10] = {0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};
unsigned int a;
void delay()
{
unsigned int i,j;
for(i=100;i>1;i--)
for(j=0;j<100;j++);
}
main()
{
while(1)
{
for(a=0;a<=9;a++)
{
P0=code1[a];
delay();
}
}
}