1、 1 基于单片机的温度控制系统设计基于单片机的温度控制系统设计 摘摘 要要 近年来随着计算机在社会领域的渗透, 单片机的应用正在不断地走向深入, 同 时带动传统控制检测日新月益更新。 本文从硬件和软件两方面来讲述水温自动控制过程,在控制过程中主要应用 AT89C51、ADC0809、LED 显示器、LM324 比较器,而主要是通过 DS18B20 数 字温度传感器采集环境温度,以单片机为核心控制部件,并通过四位数码管显示 实时温度的一种数字温度计。软件方面采用汇编语言来进行程序设计,使指令的 执行速度快,节省存储空间。为了便于扩展和更改,软件的设计采用模块化结构, 使程序设计的逻辑关系更加简洁
2、明了,使硬件在软件的控制下协调运作。 关键词:关键词:单片机系统;传感器;数据采集;模数转换器;温度 2 AbstractAbstract In recent years along with computer penetration in the social sphere, SCM applications are constantly deepening, led the traditional control test at the same time ever updated. .In this paper, from two aspects of hardware and soft
3、ware about automatic temperature control process, the control process is mainly used AT89C51, ADC0809, LED display, LM324 comparator, but mainly through the DS18B20 digital temperature sensor to collect the environmental temperature, the single-chip microcomputer as the core control component, and t
4、hrough four digital tube display real-time temperature of a digital thermometer. Software using assembly language to program design, so that the instruction execution speed, save the memory space. In order to facilitate the expansion and the change, the software design uses the modular structure, ma
5、ke the logic relation of designing program more concise, making hardware tocoordinatetheoperation under the software control. Keywords: SCM system; sensor; data acquisition; a / D converter temperature; 目目 录录 1 1 绪绪 论论 2 2 1.1 课题的背景及其意义 2 1.2 课题研究的内容及要求 3 12.1 课题的主要研究的内容. 3 2 AT89C512 AT89C51 系列单片机介
6、绍及硬件设计系列单片机介绍及硬件设计 5 5 2.1 AT89C51 系列单片机介绍 5 2.1.1 AT89C51 系列基本组成及特性 5 2.1.2 AT89C51 系列引脚功能 6 2.1.3 AT89C51 系列单片机的功能单元 8 22 硬件设计 . 11 2.2.1 温度采样部分. 11 2.22 控制温度 13 2.2.3 模数转换部分. 14 2.2.4 模数转换技术. 14 2.2.5 积分型模数转换器. 14 2.2.6 显示部分. 15 3 3 软件设计软件设计 1717 3.1 主程序流程图 . 17 3.2 读温度子程序 17 3.3 计算温度子程序 18 3.4 按键流程图 . 19 3.5 显示流程图 20 结结 论论 2222 参考文献参考文献 2323 谢谢 辞辞 2424 2 1 1 绪绪 论论 1.11.1 课题的背景及其意义课题的背景及其意义 现代工业设计,工程建设及日常生活中温度控制都起着重要的作用,早期的 温度控制主要用于工厂时间生产中,能起到实时采集温度数据,提高生产效率, 产品质量之用。随着人们生活质量的提高,