#include
unsigned char code ledtab[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x40};//0-9
unsigned char time,sec=30,scanled;
unsigned char disdat[6]={1,2,3,4,5,6};
sbit keys=P1^0;
sbit keyc=P1^1;
sbit fmq=P3^0;
void t1isr() interrupt 3 //显示
{
TH1=0xec;
困铅 TL1=0x78;
P2=1<if(scanled==2)P0=~(ledtab[disdat[scanled]] | 0x80);
else P0=~ledtab[disdat[scanled]];
汪森好 scanled++;
scanled%=6;
}
main()
{
TMOD=0x10;
春虚 TH1=0xec;
TL1=0x78;
TR1=1;
ET1=1;
EA=1;
while(1);
}