void display(uchar bai,uchar shi,uchar ge) //顯示函數(shù) 傳參:百位數(shù)字 十位數(shù)字 個位數(shù)字 { P1=table[bai]|0x80; //送段碼百位數(shù)據(jù) P2=0xfe; //送位選數(shù)據(jù) 11111110 delayms(5); //延時 P2=0xff; //消影 P1=table[shi]; //送段碼十位數(shù)據(jù) P2=0xfd; //送位碼數(shù)據(jù) 11111101 delayms(5); //延時 P2=0xff; //消影 P1=table[ge]; //送段碼個位數(shù)據(jù) P2=0xfb; //送位碼數(shù)據(jù) 11111011 delayms(5); //延時 P2=0xff; //消影 |