摘要
本文介绍的是一个由单片机构成的温度控制系统,主要用来提供测温的解决方案,同时还能实时监控温度变化趋势,以及报警功能。它利用STC89C52RC单片机,DS18B20,蜂鸣器报警电路和LCD1602来实现温度检测控制功能。温度检测是使用的DS18B20温度传感器,将检测得到的温度通过单片机单总线的协议读取并将其显示在LCD1602液晶屏上。除此之外,它还能通过按键设置温度的上限值,如果温度超过上限,则蜂鸣器报警,大大提高了系统的安全性。本文在后续章节详细介绍了系统的总体方案设计,硬件设计,软件设计等。
关键词:温度检测控制;单片机;DS18B20;报警
Abstract
Is introduced in this paper a composed of single chip microcomputer temperature control system, mainly used to provide the solution temperature, at the same time also can real-time monitor the temperature change trend, and alarm function.It USES STC89C52RC microcontroller, DS18B20, buzzer alarm detection circuit and LCD1602 to realize temperature control function.Temperature detection is used DS18B20 temperature sensor, the detection by the temperature of the single chip microcomputer single bus protocol reads and displays it on the LCD1602 LCD display.In addition, it also can set the upper limit of temperature by buttons, if the temperature is over limit, the buzzer alarm, greatly improved the security of the system.In the subsequent chapters in this paper in detail introduces the overall design of system, hardware design, software design, etc.
Keywords: temperature detection control;Single chip microcomputer;DS18B20.The police
目录
1、绪论1
1.1课题背景1
1.2 本课题研究意义2
2、 系统总体方案设计3
2.1、传感器部分3
2.2、主控制部分4
3、系统硬件设计6
3.1 STC89C52RC单片机主控模块设计6
3.2单片机最小系统9
3.2.1时钟电路9
3.2.2复位电路10
3.2.3 STC89C52RC中断技术概述10
3.3 温度采集模块DS18B2011
3.4按键模块设计13
3.5蜂鸣器报警电路13
3.6 LCD1602液晶显示14
4、软件设计16
4.1软件介绍16
4.2 主程序流程图设计17
4.3各子程序设计18
4.3.1按键设置子程序18
4.3.2 DS18B20温度检测子程序19
4.3.3 LCD1602液晶显示子程序20
4.3.3 按键设置子函数22
5、总结与展望23
6、 参考文献24
7、致谢25
附录一 系统原理图26
附录二 系统部分源程序27