温度采集系统中文版.doc
《温度采集系统中文版.doc》由会员分享,可在线阅读,更多相关《温度采集系统中文版.doc(8页珍藏版)》请在课桌文档上搜索。
1、Piogramming is relatively plex,precision is not hingh LM35.Port configuraturation:Conclusion:pared with TLC549 and LM35 temperature display circuit.This circuit is omitted by the A/D converter TLC549 will temperature digital quantity value transfer to the process of SCM system,so as to simplify the
2、circuit, shortens the working time of the system.So I choose DS18B20 temperature measurement display circuit.Port configuration:Table1AT89C51DS18B20LCD1602Crystal oscillatorRESPACK-8VCCGNDConnectDO-D71-7ConnectDQConnectXTAL1-XTAL21-2ConnectEA(VCC)VCCVDDVCCVCCConnectGNDGNDGNDGNDConnectRSConnectRWConn
3、ectESimulation circuit:When the DS18B20 temperature sensor showed a temperature of 72,the LCD display temperature is also 72.When the DS18B20 temperature sensor showed a temperature of 50,the LCD display temperature is also 50.When the DS18B20 temperature sensor showed a temperature of 20,the LCD di
4、splay temperature is also 20.According to the above figure I can know, my circuit design, the program can be piled to achieve the requirements of the problem. Debugging success.Calculation part:lcd1602_write(0x88);/第二行第一个字符的地址,以后每写入一个字符地址自动加一lcd1602_writedata(a/100)+0x30);lcd1602_writedata(a%100)/10
5、+0x30);/给定数字1的ASC码lcd1602_writedata(a%100)%10+0x30);Reference procedures are as follows:#include #include #include intrins.h #define uchar unsigned char #define uint unsigned int/以上为预编译typedef unsigned char BYTE;bdata unsigned char data_tmp; sbit b_in=data_tmp0; sbit ck=P27; sbit cs=P26; sbit b_data
6、=P25;sbit DQ = P33; /DS18B20的数据口位BYTE TPH; /存放温度值的高字节BYTE TPL; /存放温度值的低字节 sbit RS=P20; sbit RW=P21; sbit ENABLE=P22;/以上设置LCD1602的控制端口void DelayXus(BYTE n);void DS18B20_Reset();void DS18B20_WriteByte(BYTE dat);BYTE DS18B20_ReadByte();unsigned int ADC_DS();unsigned char ADC_TLC() unsigned char dd,x,y;
7、 ck=1; cs=1; b_data=1; cs=0;for(dd=0;dd200;dd+);for (y=0;y8;y+) /b_in=b_data; data_tmp=data_tmp1; b_in=b_data; ck=!ck; ck=!ck; x=data_tmp; cs=1; x=x/2; for(dd=0;dd0;x-)for(y=110;y0;y-);void lcd1602_write(uchar )/写控制命令RW=0;RS=0;/W MODE INSRUCTIONP0=;/取指令ENABLE=0;_nop_();/Tsp1=60nsENABLE=1;_nop_();/Tp
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 温度 采集 系统 中文版

链接地址:https://www.desk33.com/p-17060.html