基于51单片机的温度检测报警系统 下载本文

内容发布更新时间 : 2024/5/5 12:14:17星期一 下面是文章的全部内容请认真阅读。

单片机课程设计报告

目录

温度检测报警系统 ......................................................................................................................... 1 摘要 ................................................................................................................................................. 1 序言 ................................................................................................................................................. 2 第一章整体设计原理 ..................................................................................................................... 3 第二章各模块简介及工作原理 ..................................................................................................... 4

2.1 控制模块 .......................................................................................................................... 4

2.1.1 STC89C52简介 ...................................................................................................... 4 2.1.2 STC89C52主要功能 ............................................................................................ 4 2.2 温度检测模块 .................................................................................................................. 5

2.2.1 DS18B20简介 ........................................................................................................ 5 2.2.2 DS18B20封装及接线说明: ................................................................................ 5 2.2.3 DS18B20 主要特点 ............................................... 6 2.2.4 DS18B20外围电路设计 ........................................... 7 2.3 显示模块 .......................................................................................................................... 7

2.3.1 液晶显示器简介 ................................................ 8 2.3.2 LCD1602引脚功能说明 .......................................... 9 2.3.3 LCD1602的指令说明及时序 ...................................... 9 2.4 报警模块 ........................................................................................................................ 11 第三章软件设计与说明 ............................................................................................................... 12

3.1 系统总体软件设计 ........................................................................................................ 12 3.2 温度检测模块软件设计 ................................................................................................ 12 3.3 显示模块软件设计 ........................................................................................................ 13 第四章调试结果及其说明 ........................................................................................................... 14 第五章心得体会 ........................................................................................................................... 15 参考文献 ....................................................................................................................................... 16

1

单片机课程设计报告

温度检测报警系统

摘要

该系统引入一种基于51单片机的温度检测报警系统,该系统由主控模块、检测模块、显示模块以及报警模块组成,主控模块采用STC89C52单片机,其控制检测模块中的DS18B20温度传感器检测环境温度,并将检测到的温度传送给显示模块中的LCD1602显示屏显示,而且主控模块在温度超过温度上限值或低于温度下限值时,控制语音报警模块中的蜂鸣器报警。四大模块协调工作,主要实现温度检测、温度显示以及报警的功能。 关键字:温度,显示,报警,STC89C52

Temperature detection alarm system

ABSTRACT

The system introduces a 51 microcontroller-based temperature detection alarm system, the system consists of a main control module, the detection module, the display module and alarm module, main control module using STC89C52 microcontroller, which controls the detection module DS18B20 temperature sensor detects the ambient temperature and the detected temperature is transmitted to the display module LCD1602 display, and control module limit or below temperature limits, control the voice alarm module buzzer alarm at the temperature exceeds the temperature. Coordination of four modules, the main temperature detection, temperature display and alarm function.

Key words:Temperature, display, alarm, STC89C52

1

单片机课程设计报告

序言

随着科技的不断发展,日常生活中越来越多的采用高温高热的一些设备及装置,它在方便了人们生活的同时,也留下了安全隐患,因此做好高温预警工作是非常必要的。为了能实现防火、防灾的目的,就必须采取合理的自动检测和控制手段。

而且在大棚中种植的果蔬以及地窖粮仓等地储藏的粮食果蔬等,都需要适宜的温度生长和储存,而为了节省人力物力,智能地进行温度检测和报警给相关人员尤为必要。 因此,为了解决上述问题,该系统引入一种温度检测报警系统,该系统具有检测温度、显示温度、以及对温度进行上下限进行报警的功能。

2