}
{ }
if((bai*10+shi) else if((bai*10+shi) if(((bai*10+shi) BEEP=1; ALAM1=1; ALAM=1; BEEP=1; ALAM=0; BEEP=0; ALAM=0; BEEP=1; ALAM1=0; /*****主函数*****/ void main(void) { ui z; InitTimer(); //初始化定时器 EA=1; //全局中断开关 ET0=1; //开启定时器0 check_wendu(); check_wendu(); shangxian=read_add(10); xiaxian=read_add(20); for(z=0;z<300;z++) { } while(1) { if(SET==0) { } if(set_st==0) { check_wendu(); Disp_Temperature(); Delay(2000); do{} while(SET==0); set_st++;x=0;shanshuo_st=1; if(set_st>2)set_st=0; Disp_init(); } Alarm(); //报警检测 else if(set_st==1) { BEEP=1; //关闭蜂鸣器 ALAM=1; ALAM1=1; if(x>=10){shanshuo_st=~shanshuo_st;x=0;} if(shanshuo_st) {Disp_alarm(shangxian);} if(ADD==0) { } else if(DEC==0) { } do{Disp_alarm(shangxian);} while(DEC==0); shangxian--; if(shangxian if(shangxian>99)shangxian=99; write_add(10,shangxian); } else if(set_st==2) { } BEEP=1; //关闭蜂鸣器 ALAM=1; ALAM1=1; if(x>=10){shanshuo_st=~shanshuo_st;x=0;} if(shanshuo_st) {Disp_alarm(xiaxian);} if(ADD==0) { } else if(DEC==0) { } do{Disp_alarm(xiaxian);} while(DEC==0); xiaxian--; if(xiaxian<0) xiaxian=0; write_add(20,xiaxian); do{Disp_alarm(xiaxian);} while(ADD==0); xiaxian++; if(xiaxian>shangxian) xiaxian=shangxian; write_add(20,xiaxian); } } /*****定时器0中断服务程序*****/ void timer0(void) interrupt 1 { } TH0=0x3c; TL0=0xb0; x++;