void display(uchar bai,uchar shi,uchar ge) //显示函数 传参:百位数字 十位数字 个位数字 { P1=table[bai]|0x80; //送段码百位数据 P2=0xfe; //送位选数据 11111110 delayms(5); //延时 P2=0xff; //消影 P1=table[shi]; //送段码十位数据 P2=0xfd; //送位码数据 11111101 delayms(5); //延时 P2=0xff; //消影 P1=table[ge]; //送段码个位数据 P2=0xfb; //送位码数据 11111011 delayms(5); //延时 P2=0xff; //消影 |