#define u8 unsigned char
#define u16 unsigned int
u8 code table[] = {
0xc0,0xf9,0xa4,0xb0, 0x99,0x92,0x82,0xf8,
0x80,0x90,0x88,0x83, 0xc6,0xa1,0x86,0x8e,
};
void delay(u16 t)
{
u16 i;
for(;t>0; t--)
for(i=100; i>0; i--);
}
void main(void)
{
u8 num = 0;
while(1) {
P1 = table[num];
delay(1000);
num++;
if(num>9)
num = 0;
}
}