更新时间:07-25 (阳の阳)提供原创文章
摘 要:温控系统在生活和科研中的应用非常广泛,其重要性更是不言而喻。因此,开发更精准的高性能温控系统很有必要。
本次设计以单片机控制DS18B20,利用单总线通信,从而实现对温度的超温报警控制。这就是本次设计的设计思路。本设计主要包括硬件和软件两部分,硬件体现在电路原理图中,为实现硬件功能,软件设计采用C程序设计,主要包括:4*4键盘按键控制,数码管显示程序,DS18B20读写时序,片内ROM匹配程序,读取温度值程序,蜂鸣器声光报警。本次设计的原理是键盘设定温度上下限,单片机向DS18B20发送读写命令,读取温度值并与设定温度值比较,如果大于设定值则声光报警,同时显示实际温度。
本设计达到了所需要求。通过按键来检测4个点上的温度情况,效果可靠。
关键词:DS18B20 单总线 单片机 温度采集
ABSTRACT:Temperature control system is widely used in life and in scientific research,Its importance is self-evident. Therefore,It is necessary to develop more accurate temperature control system with high performance.
Taking Single-chip microcomputer as the host,DS18B20 temperature sensor from the machine. We can make the over-temperature alarm temperature control come true based on the single bus communication.This is the purpose of this design.This design mainly includes two parts: hardware and software.The hardware was reflected to the schematic diagram,so as to achieve the function of the hardware,Software design using C programming,The programming mainly includes The 4*4 keyboard keys to control, Digital tube display program,DS18B20 read and write timing,The on-chip ROM matching program,Reading the temperature program,Buzzer alarm with voice and light.The principle of this design is using keyboard set temperature limits. MCU sends to the DS18B20 read and write commands.Reading the temperature and compare with the set temperature value.If is greater than the set value ,the sound and light alarm system would be touched off and the actual temperature display at the same time.
The design meet the requirement. Through the keys to detect the temperature of the 4 points . The effect is Reliable.
Keywords: DS18B20 sensor; single bus; single-chip microcomputer; temperature acquisition