#include <reg52.h> #include <intrins.h> #define uchar unsigned char #define uint unsigned int sbit rs = P1^0; //LCD1602功能引脚 sbit rw = P1^1; //LCD1602功能引脚 sbit ep = P1^2; //LCD1602功能引脚 sbit up = P1^3; //升温继电器控制端 sbit down = P1^4; //降温继电器控制端 sbit DS=P1^7; //DS18B20总线 bit flagn,flags; //定义"+"、"-"标志位 long int as=0,an,x,temp; //定义长整型全局变量 char Ts[7],Tn[7]; //定义长度为7的字符串 unsigned char code Ws[] = {"T set up="}; //定义显示字符串 unsigned char code Wc[] = {" welecome!"}; //定义显示字符 unsigned char code Er[] = {" Error!"}; //定义显示字符 unsigned char code Pr[] = {" Please Reboot!"}; //定义显示字符 unsigned char code Wn[] = {" T now ="}; //定义显示字符 uchar HSM,LJC,tmp,keyvalue; //定义字符型全局变量 |