- 1、本文档共14页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
湿度传感器与单片机连接(The humidity sensor is connected with the singlechip)
湿度传感器与单片机连接(The humidity sensor is connected with the singlechip)
DHT11 usage paradigm
SCM: / / AT89S51
/ / function: serial port baud rate 9600 humidity data
/ / hardware connection: P2.0 port for communication port to connect to the DHT11, DHT11 and power supply and connecting one of the microcontroller, the microcontroller serial MAX232 connected computer
//****************************************************************//
#include reg51.h
#include intrins.h
/ /
Typedef unsigned char U8 defined for unsigned 8-bits integer; / * variable unsigned 8 bit integer variables.
Typedef signed char S8 defined for signed 8-bits integer; / * variable signed 8 bit integer variables.
Typedef unsigned int U16 defined for unsigned 16-bits integer; / * variable unsigned 16 bit integer variables.
Typedef signed int S16 defined for signed 16-bits integer; / * variable signed 16 bit integer variables.
Typedef unsigned long U32 defined for unsigned 32-bits integer; / * variable unsigned 32 bit integer variables.
Typedef signed long S32 defined for signed 32-bits integer; / * variable signed 32 bit integer variables.
Typedef float F32 single precision floating point; / * variable (32bits) single precision floating point number (32 digits).
Typedef double F64 double precision floating point; / * variable (64bits) double precision floating-point number (64 digits).
/ /
#define uchar unsigned char
#define uint unsigned int
#define Data_0_time 4
//----------------------------------------------//
//----------------IO port is defined --------------------//
//----------------------------------------------//
Sbit P2_0 = P2^0;
Sbit P2_1 = P2^1;
Sbit P2_2 = P2^2;
Sbit P2_3 = P2^3;
//----------------------------------------------//
//---------------- defined area --------------------//
//----------------------------------------------//
U8, U8FLAG, k;
U8, U8count, U8temp;
U8, U8T_data_H, U8T_data_L, U8RH_data_H, U8RH_data_L, U8checkdata;
U8, U8T_data_H_temp, U8T_data_L_temp, U8RH_data_H_temp, U8R
您可能关注的文档
- 普通话水平测试试题(第6-10号)(Putonghua proficiency test questions (No. 6-10)).doc
- 普通话水平测试等级标准(Standard for Putonghua Proficiency Test).doc
- 普通话等级证书有什么用(What's the use of the Putonghua certificate).doc
- 景观方案文本制作内容_百度文库_20150825_143920(Landscape plan text making content _ Baidu library _20150825_143920).doc
- 景德镇公交线路(Jingdezhen bus line).doc
- 智取终端之孔雀开屏——谈服装店铺的布局与陈列(The peacock tail -- on the terminal to outsmart the clothing store layout and display).doc
- 晶体管特性测试仪的使用(The use of transistor characteristics tester).doc
- 智能液压起拨道机的设计(Design of intelligent hydraulic lifting track machine).doc
- 景观工程预算知识点(Landscape engineering budget knowledge point).doc
- 景观(竖向)设计学习资料 坐标·标高·环境——常见总平面设计问题与(Landscape (vertical) design, learning data, coordinates, elevation, environment - common graphic design problems and).doc
- 湘渝铁路(Hunan Chongqing Railway).doc
- 源自个性城市的特色设计_湖南永州火车新站地区设计_朱晓明(From the design of _ characteristic design _ personality city of Hunan Yongzhou new train station area of Zhu Xiaoming).doc
- 滑雪的初级入门技巧(Introduction to skiing).doc
- 满堂基础(Full house foundation).doc
- 漫画的制作过程(The making process of comics).doc
- 漫谈我国电子商务的发展现状和对策(Discussion on the current situation and Countermeasures of e-commerce development in China).doc
- 满城尽是美人鱼——评星巴克品牌泛滥之危(The whole city is full of mermaids -- Comment on the danger of Starbucks brand flooding).doc
- 澳大利亚皇家墨尔本理工大学(Royal Melbourne Institute of Technology University Australia).doc
- 潜意识学习法(Subconscious learning).doc
- 澳洲和英国商科硕士指标对比(Comparison of master's programs in Australia and the UK).doc
文档评论(0)