网学网为需要电子机械的朋友们搜集整理了基于DS18B20的数字温度计设计相关资料,希望对各位网友有所帮助!
论文字数:5447,页数:28
摘要
本论文介绍了一种以单片机为主要控制器件,以DS18B20为温度传感器的新型数字温度计。主要包括硬件电路的设计和系统程序的设计。硬件电路主要包括电源电路,主控电路,显示电路,温度传感器和串口通信电路。主控制器采用单片机STC89C52,温度传感器采用美国DALLAS半导体公司生产的DS18B20,测量的温度值除在系统板上通过两位数码管显示外,同时通过串口实现上位机(PC)的监控。系统电路设计采用Protel完成,硬件电路在通用板上实现。
由于采用了改进型智能温度传感器DS18B20作为检测元件,与传统的温度计相比,该数字温度计减少了外部的硬件电路,具有低成本和易使用的特点。DS18B20温度计还可以在高温报警、远距离多点测温控制等方面进行应用开发,具有很好的发展前景。
关键词:温度传感,DS18B20,STC89C52,串口
ABSTRACT
The present paper introduces one kind of new digital thermometer which takes MCU as the primary control component and takes DS18B20 as the temperature sensor. Mainly includes the hardware circuit design and the system program design. The hardware circuit mainly includes power circuit, the master control circuit, the display circuit , temperature sensor and serial communication circuit. The master control circuit uses STC89C52 and the temperature sensor uses DS18B20 which is produced by American DALLAS semiconductor company . The temperature can be measured on the system board ,displayed through two digital control, and monitored by PC through the serial interface . System circuit design uses Protel to complete ,hardware circuit is designed on the general board.
Because of using the advanced version of intelligence temperature sensor DS18B20 as examination component, compared with the traditional thermometer, this digital thermometer reduced the external hardware circuit, and has the characteristics of low cost and easy usage. The DS18B20 thermometer can carry on application development in different aspects:such as alarm in high temperature, temperature measurement with long-distance range and multi- spoo. So that it has a very good prospects for development.
Keyword: temperature sensor, DS18B20, STC89C52, Serial ports
目录
摘要 I
ABSTRACT II
第1章 引言 1
1.1 背景 1
1.2 研究内容 1
第2章 系统硬件设计 3
2.1 电路原理图 4
2.2 电源电路 4
2.3 主控电路 5
2.4 显示电路 5
2.5 温度传感器 6
2.5.1 DS18B20的简单介绍 6
2.5.2 DS18B20 的性能特点 7
2.5.3 DS18B20的测温原理 8
2.6 串口通信电路 9
第3章 系统软件设计 10
3.1 主程序功能分析 10
3.2 DS18B20控制子程序功能分析 11
3.2.1 DS18B20读温度 11
3.2.2 DS18B20写数据 13
3.2.3 DS18B20读数据 14
3.2.4 DS18B20初始化 16
3.3 显示子程序功能分析 17
第4章 系统测试 19
4.1温度显示测试 19
4.2与PC通信测试 19
第5章 结束语 21
致谢 22
参考文献 23
附录 元器件清单 24