初级会员

- 积分
- 63
- 金钱
- 63
- 注册时间
- 2022-1-18
- 在线时间
- 15 小时
|

楼主 |
发表于 2022-5-24 20:05:12
|
显示全部楼层
void hc595_5STest(uint16_t num)
{
uint8_t temp = 0;
uint8_t j = 0;
if(num >= 9999)
num = 0000;
for(j = 0; j < 50; j++)
{
// 数据选择
temp = Display[num / 1000];
HC595_Send(temp);
SMG_Sele(0); //数码管显示数据
HC595_RCK(1);
Delay_Ms(5);
// 选择数据
temp = Display_1[num / 100%10];
HC595_Send(temp);
SMG_Sele(1); //数码管显示数据
Delay_Ms(5);
// 选择数据
temp = Display[num / 10%10];
HC595_Send(temp);
SMG_Sele(2); //数码管显示数据
Delay_Ms(5);
// 选择数据
temp = Display[num % 10];
HC595_Send(temp);
SMG_Sele(3); //数码管显示数据
Delay_Ms(5);
}
}
/**************************************************************
这个就是数码管显示函数,执行一次就是1秒,在这1秒里面其他程序是动不了的,
有没有什么好的解决办法啊
*******************************************************************/ |
|