#include
#define uint unsigned int
#define uchar unsigned char
uchar code table[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e};
sbit diola=P2^5;
sbit dula=P2^6;
sbit wela=P2^7;
void Delay(uint x)
{
uchar i;
while(x--)
for(i=0;i120;i++);
}
void main()
{
uchar i;
wela=0;
dula=0;
diola=1;
while(1)
{
for(i=0;i10;i++)
{
wela=1;
P0=0x0f;
wela=0;
dula=1;
P0=table[i];
P1=table[i];
dula=0;
Delay(500);
}
}
}