文档介绍:基于DS18B20的数字温度计设计
摘要
随着现代信息技术的飞速发展和传统工业改造的逐步实现,能够独立工作的温度检测与显示系统应用于诸多领域。传统的温度检测以热敏电阻为温度敏感元件。热敏电阻的成本低,需要外加信号处理电路,而且可靠性相对较差,测温准确度低,检测系统也有一定的误差。与传统的温度计相比,这次设计的是基于DS18B20的数字温度计,它具有读数方便,测温范围广,测温精确,数字显示,适用范围宽等特点。
在本设计中选用AT89C51型单片机作为主控制器件,采用DS18B20数字温度传感器作为测温元件,通过4位共阳极LED数码显示管并行传送数据,实现温度显示。本设计的内容主要分为两部分,一是对系统硬件部分的设计,包括温度采集电路和显示电路;二是对系统软件部分的设计,应用C语言实现温度的采集与显示。通过DS18B20直接读取被测温度值,送入单片机进行数据处理,之后进行输出显示,最终完成了数字温度计的总体设计。其系统构成简单,信号采集效果好,数据处理速度快,便于实际检测使用。
关键词:单片机AT89C51;温度传感器DS18B20;LED数码管;数字温度计
Design based Digital Thermometer DS18B20
Abstract
Along with the present information technology's swift development and traditional industry transformation's gradual realization. Able to work independently of the temperature detection and display system used in many other fields. Traditional temperature examination take thermistor as temperature sensitive unit. Thermistor's cost is low, needs the sur- signal processing electric circuit, moreover the reliability is relatively bad, the temperature measurement accuracy is low, the examination system also has certain error. Compares with the traditional thermometer, what this design is based on the DS18B20 digital thermometer, it has the reading to be convenient, the temperature measurement scope is broad, the temperature measurement is precise, the digit demonstrated that applicable scope wide and so on characteristics.
Used in the design AT89C51 MCU as the main control device, digital temperature sensor DS18B20 as the ponents of the anode through the four LED digital display tube parallel transmission of data, to achieve temperature display. This design's content mainly divides into two parts; first, to system hardware part design, including temperature gathering electric circuit and display circuit; Second, to the system software part's design, realizes temperature gathering and the demonstration using the C language. DS18B20 measured by direct reading temperature values,
and transfer Data into MCU,and output to show,this is the de