显示到lcd上怎么成这样了 数字一直不变 这是啥问题?
大神解决下
附上我的主程序:
void main()
{
init_eeprom();
time_init();
showw();
while(1)
{
key();
if(yemian==0)
{
if(flat==1)
{
flat=0;
lcd_init();
display(0x00,'T') ; //Temp
display(0x01,'e');
display(0x02,'m');
display(0x03,'p');
display(0x04,':');
display(0x08,0xdf);
display(0x09,'C');
display(0x40,'H'); //Humi
display(0x41,'u');
display(0x42,'m');
display(0x43,'i');
display(0x44,':');
display(0x47,'%');
display(0x48,'R');
display(0x49,'H');
display(0x0c,'T');
display(0x0d,':');
display(0x0e,WenDu/10+0x30);
display(0x0f,WenDu%10+0x30);
display(0x4c,'H');
display(0x4d,':');
display(0x4e,ShiDu/10+0x30);
display(0x4f,ShiDu%10+0x30);
}
if(flag_300ms == 1)
{
flag_300ms = 0;
receive();
display(0x05,TH/10+0x30);
display(0x06,TH%10+0x30);
display(0x45,RH/10+0x30);
display(0x46,RH%10+0x30);
warn();
}
}
if(yemian==1)
{
if(flat==1)
{
flat=0;
bee=1;
lcd_init();
display(0x06,'T');
display(0x07,'e');
display(0x08,'m');
display(0x09,'p');
}
shezhi();
display(0x47,WenDu/10+0x30);
display(0x48,WenDu%10+0x30);
}
if(yemian==2)
{
if(flat==1)
{
flat=0;
bee=1;
lcd_init(); //?????
display(0x06,'H');
display(0x07,'u');
display(0x08,'m');
display(0x09,'i');
}
shezhi();
display(0x47,ShiDu/10+0x30);
display(0x48,ShiDu%10+0x30);
}
}
}
|