嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 2 元微信扫码支付:2 元
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
#include<reg52.h>
#include "intrins.h"
typedef unsigned char uint8;
typedef unsigned int uint16;
sbit rs=P2^6; // 数据命令选择
sbit rw=P2^5; //读写选择
sbit e=P2^7; //使能
sbit k1=P3^3; //模式
sbit k2=P2^1; //加
sbit k3=P2^2; //减
sbit DHT11_DQ_OUT=P3^2;
sbit led1=P3^6;
sbit led2=P3^7;
sbit dq=P2^0;
uint8 mode=0,xian;
char temph=50,templ=20;
char humih=80,humil=20;
uint8 temp,humi;
uint8 flag; //设定报警标志
uint8 a,c,tempvalue;
uint8 code num[10]="0123456789";
uint8 code str1[]="Temp:"; //温度
uint8 code str2[]="Humi:"; //湿度
uint8 code str3[]="Error";
uint8 code str4[]="Success ";
uint8 code str5[]="%RH";
uint8 code str6[]="TempH:"; //设定温度上限显示
uint8 code str7[]="TempL:"; //设定温度下限显示
uint8 code str8[]="HumiH:"; //设定湿度上限显示
uint8 code str9[]="HumiL:"; //设定湿度下限显示