|
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; //消影 |