单片机的实现多任务程序(7)
发布时间:2021-06-06
发布时间:2021-06-06
在51单片机如何实现多任务的程序
SMG_Value[Move_Num] = 9;
else
SMG_Value[Move_Num] -= 1;
}
}
Key3_Flag2 = 0;
}
}
//进入循环显示后清键值单元
void Clear_Key_Data(void)
{
SMG_Value[3] = 0;
SMG_Value[2] = 0;
SMG_Value[1] = 0;
SMG_Value[0] = 0;
}
//数码管显示子程序
void Display_ShuM()
{
unsigned char i;
Qian_bit = 0;
Shu_Ma_Data = Led_Byte[SMG_Value[3]];
if (( Move_Num == 3 ) && ( CDis_Flag ))
XiSu_Dian = 1;
for ( i = 0;i < 20; i++);
Qian_bit = 1;
Bai_bit = 0;
Shu_Ma_Data = Led_Byte[SMG_Value[2]];
if (( Move_Num == 2 ) && ( CDis_Flag ))
XiSu_Dian = 1;
for ( i = 0;i < 20; i++);
Bai_bit = 1;
Shi_bit = 0;
Shu_Ma_Data = Led_Byte[SMG_Value[1]];