}
void yanshi(uint z)//延時函數(shù)
{
uint x, y;
for (x = z; x>0; x--) //若for循環(huán)中數(shù)值為真,則維持循環(huán),一旦為假,
for (y = 110; y>0; y--); //則退出循環(huán)語句,以此來達到延時的目的
}
void guanjiao(uchar n)//管腳顯示函數(shù)
{
switch (n)
{
case 0:a = 0; b = 0; c = 0; d = 0; e = 0; f = 0; break;
case 1:b = 0; c = 0; break;
case 2:a = 0; b = 0; g = 0; e = 0; d = 0; break;
case 3:a = 0; b = 0; g = 0; c = 0; c = 0; d = 0; break;
case 4:f = 0; g = 0; b = 0; c = 0; break;
case 5:a = 0; f = 0; g = 0; c = 0; d = 0; break;
case 6:a = 0; f = 0; e = 0; d = 0; c = 0; g = 0; break;
case 7:a = 0; b = 0; c = 0; break;
case 8:a = 0; b = 0; c = 0; d = 0; e = 0; f = 0; g = 0; break;
case 9:a = 0; b = 0; c = 0; d = 0; f = 0; g = 0; break;
case 10:h = 0; break;
case 11:a = 1; b = 1; c = 1; d = 1; e = 1; f = 1; g = 1; g = 1; f = 1; g = 1, h = 1; break;
case 12:h = 1; break;
}
}
void xiaodou()//消抖函數(shù)
{
uchar x;
for (x = 15; x > 0; x--) //若for循環(huán)中數(shù)值為真,則維持循環(huán),一旦為假,則退出循環(huán)語句,以此來達到延時的目的
{
xianshi();
}
}
void write_shi(uchar shu)//寫小時函數(shù)
{
uchar shiwei, gewei; //定義十位和個位數(shù)據(jù)類型
shiwei = shu / 10; //將一個數(shù)進行十位和
gewei = shu % 10;//小時的拆分