1、 毕 业 论 文(设计) 题 目: 基于单片机的温度报警器的设计 姓 名: 学 院: 理学与信息科学学院 专 业: 电子信息科学与技术 班 级: 学 号: 指导教师: 2010 年 6 月 13 日 1 目录 摘要 1 Abstract 1 1 引言 1 1.1 课题背景 1 1.2 研究内容和意义 2 2 芯片介绍 3 2.1 DS18B20 概述 3 2.1.1 DS18B20 封装形式及引脚功能 3 2.1.2 DS18B20 内部结构 4 2.1.3 DS18B20 供电方式 6 2.1.4 DS18B20 的测温原理 7 2.1.5 DS18B20 的 ROM 命令 8 2.2 AT
2、89C51 概述 9 2.2.1 单片机 AT89C51 介绍 9 2.2.2 功能特性概述 . 10 2.2.3 空间节电模式: . 13 2.3 74LS245 概述 . 14 3 系统硬件设计. 16 3.1 温度控制系统的整体设计 . 16 3.2 温度控制系统的基本组成. 16 3.2.1 系统电路图 . 17 3.3 温度报警器器的整体设计 . 17 3.4 温度报警器的基本组成 . 18 3.4.1 晶振电路 . 18 3.4.2 复位电路 . 18 3.4.3 温度报警电路 . 19 3.5 控制说明. 19 4 系统软件设计. 20 4.1 系统主程序流程图. 20 4.2
3、温度采集模块. 21 4.2 温度显示. 22 5 系统调试与结果. 23 6 总结. 27 致谢. 28 参考文献. 29 附录 A 温度报警器部分程序 . 30 1 基于单片机的温度报警器的设计 摘要: 在工业生产过程中,人们需要对各类加热炉、热处理炉、反应炉和锅炉中的温度进 行检测和控制。因为单片机具有低功耗、高性能、可靠性好、易于产品化等特点,因此采用 单片机对温度进行控制不仅控制方便、简单和灵活,而且可以提高被控温度的技术指标,从 而能够大大提高产品的质量。 本论文设计了一种基于单片机的温度报警器。 控制器采用单片 机 AT89C51,数字式检测部分采用 DS18B20 数字温度传感
4、器,LED 数码管作为显示器,综合 运用了微机原理、自动控制原理、模拟电子技术、数字控制技术、键盘显示技术等诸多方面 的知识。设计过程中,首先进行硬件的设计,其次进行软件设计,最后仿真和综合调试,最 终使得此系统实现了温度的采集、显示和报警设计。 关键词:MCS-51 单片机;温度传感器;温度报警 1 The Design of Temperature Alarm Based on Single-chip Microcomputer Abstract:In industrial production process, people need to detect and control all
5、kinds of heating furnace, heat treatment furnace, reactors and boiler temperature. MCU has the advantages of the low power consumption, good reliability, easy to product and so on ,thus MCU control of temperature is not only convenient, simple and agile, but also can improve the technical indexes ac
6、cused of temperature, which can greatly improve the quality of the products. This paper designs an temperature alarm based on single-chip microcomputer controller adopts single-chip A T89C51, digital testing part USES digital temperature sensor DS18B20, monitor uses LED digital. The design Comprehensively use as a microcomputer principle, automatic control theory, analog electronic technology, digita