![]() |
發布時間: 2022-5-22 19:46
正文摘要:單片機源程序如下:#include <reg52.h> #include <intrins.h> #include <lcd.h> #define uchar unsigned char #define uint unsigned int sbit key1=P ... |
調時間的時候停止溫度顯示更新 如 405行 if(num==0)display(); |
謝謝,我用仿真調試一下可以正確顯示,但是按鍵調整時間好像有沖突,按設置鍵光標會在溫度哪里來回閃,請問怎么解決呢 |
基于STC89C52單片機LCD1602顯示的DS1302時鐘帶溫度采集顯示 |
lj2443454061 發表于 2022-5-22 19:46 void display() { unsigned int temp0=0,temp1=0,temp2=0; temp0=wdz/100; temp1=(wdz%100)/10; temp2=wdz%10; Delay1ms(5); lcd_writechar(11, 1, table3[temp0]); Delay1ms(5); lcd_writechar(12, 1, table3[temp1]); Delay1ms(5); lcd_writechar(13, 1, table3[temp2]); Delay1ms(5); lcd_writechar(14, 1, 0xdf); Delay1ms(5);; lcd_writechar(15, 1, table3[13]); Delay1ms(5); } |
請問該怎么改動才能正確顯示溫度值呢 |