网站大量收购闲置独家精品文档,联系QQ:2885784924

DHT11+1602显示+串口通信(国外英语资料).doc

  1. 1、本文档共22页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
DHT111602显示串口通信(国外英语资料)

DHT11+1602显示+串口通信(国外英语资料) # include reg52. H # include intrins. H # define uint unsigned int # define uchar unsigned char Typedef unsigned char U8; / * defined for unsigned 8-bits integer variable unsigned integer variable * / Typedef signed char S8; / * defined for signed 8-bits integer variable has the symbol 8 integer variable * / Typedef unsigned int U16; / * defined for unsigned 16-bits integer variable no symbol 16 integer variable * / Typedef signed int S16; / * defined for signed 16 - bits integer variable has the symbol 16 integer variable * / Typedef bit BOOL; # define Data_0_time 4 Sbit IO = P2 ^ 3; Sbit rs = P2 ^ 0; Sbit rw = P2 ^ 1; Sbit ep = P2 ^ 2; Sbit sd = P2 ^ 4; Sbit bj = P2 ^ 7; U8 count, k; U8 data_byte, temp; U8 T_H, T_L, R_H, R_L, check; U8 receive_byte (); U8 outdata [5]. / / the number of bytes sent U8 indata [5]. U8 cot, cot_r = 0; U8 STR [5] = { RS232 }; SendData publishes the event (U8 * a) { Outdata [0] = a [0]; Outdata [1] = a [1]; Outdata [2] = a [2]; Outdata [3] = a [3]; Outdata [4] = a [4]; Cot = 1; SBUF outdata = [0]. } Uchar code table [] = normal; Uchar code table1 [] = ; Uchar code table2 [] = Deviant; Uchar code table3 [] = ; Uchar num. Uchar data_byte; Uchar RH, RL, TH, TL; / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * delay module * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / Void delay uchar (ms) {/ / delay subroutine Uchar I; While (ms) -- { For (I = 0; I 250; I + +); } } Void delay1 () / / delay 10us { Uchar I; I --; I --; I --; I --; I --; I --; } Void delay2 (under-16 j) {U8 I; (j, , 0; j --) { For (I = 0; I 27; I + +); } } Void longdelay (uchar s) / / long delay { While (s) -- { Delay (60); } } /

您可能关注的文档

文档评论(0)

f8r9t5c + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8000054077000003

1亿VIP精品文档

相关文档