《环境监测仪》word版

《环境监测仪》word版

ID:24849981

大小:55.38 KB

页数:13页

时间:2018-11-15

《环境监测仪》word版_第1页
《环境监测仪》word版_第2页
《环境监测仪》word版_第3页
《环境监测仪》word版_第4页
《环境监测仪》word版_第5页
资源描述:

《《环境监测仪》word版》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库

1、#include#include//#defineLCD_dataP0//数据口typedefunsignedcharunint8;typedefunsignedcharunint16;#definepower_down0x00#definepower_on0x01#definereset0x07#defineh_resolution_mod0x10#definem_resolution_mod0x13#definel_resolution_mod0x16#de

2、fineonetime_h0x20#defineonetime_m0x23#defineonetime_l0x26#definewrite_17100x46#defineread_17100x47sbitSCL=P1^0;sbitSDA=P1^1;sbitdvi=P1^2;unsignedcharstr1[]={""};unsignedcharstr2[]={""};charstr3[]="";unsignedcharcodewel1[]={"****************"};unsignedch

3、arcodewel2[]={"

4、WelcomeYou!

5、"};unsignedcharcodewel3[]={"

6、MADE:李培陈杰"};unsignedcharcodewel4[]={"****************"};unsignedcharcodedis1[]={"温湿度检测系统:"};unsignedcharcodedis2[]={"湿度:%RH"};unsignedcharcodedis3[]={"温度:C"};unsignedcharcodedis4[]={"光强:LX"};sbitT

7、RH=P3^6;sbitBeep=P1^5;sbitLCD_RS=P2^4;//寄存器选择输入sbitLCD_RW=P2^5;//液晶读/写控制sbitLCD_EN=P2^6;//液晶使能控制sbitLCD_PSB=P2^1;//串/并方式控制sbitLCD_RST=P2^3;//液晶复位端口unint8TH_data,TL_data,RH_data,RL_data,CK_data;unint8TH_temp,TL_temp,RH_temp,RL_temp,CK_temp;unint8com_data

8、,untemp,temp;unint8respond;/*********************************************************************************/voiddelayNOP(){_nop_();_nop_();_nop_();_nop_();}/*********************************************************************************//***********

9、**********************************************************************///毫秒级延时子程序/*********************************************************************************/voiddelay_ms(unsignedcharms){unsignedchari;while(ms--){for(i=0;i<250;i++){_nop_();_nop_()

10、;_nop_();_nop_();}}}/*********************************************************************************//*********************************************************************************///5us级延时程序/********************************************************

11、*************************/voiddelay_us(){unint8i;i--;i--;i--;i--;i--;i--;}/********************************************************************************//************************************************************************

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。