1、 目 录 摘要 . 1 关键词 . 1 AbstractAbstract . 1 Key wordsKey words 1 1 绪论 . 1 1.1 温度传感器 . 2 1.2 系统概述 2 2 硬件概述 . 3 2.1 DS18B20 3 2.1.1 DS18B20 特点 3 2.1.3 DS18B20 管脚排列 3 2.1.4 DS18B20 工作原理 . 4 2.1.5 DS18B20 主要数据部件 . 5 2.2 STC89C52 单片机 . 7 2.3 LCD1602 液晶 8 2.3.1 液晶显示模块概述 8 2.3.2 模块引脚说明 9 3 系统设计 . 9 3.1 硬件设计 9
2、 3.1.1 设计思路 . 9 3.1.2 总体设计方框图 10 3.2 软件设计 10 3.2.1 软件开发环境 11 3.2.2 DS18B20 软件设计 . 12 3.2.3 DS18B20 初始化 . 13 3.2.4 对 DS18B20 的读和写操作 14 3.2.5 液晶显示程序 16 3.3 系统仿真调试 . 19 4.总结语 21 参考文献 21 附录一 22 1 基于 DS18B20 的测温系统设计 摘要:本文主要介绍了一种基于 DS18B20 的测温系统,利用 DS18B20 进行测温,基于单 片机 STC89C52 进行温度控制,以 1602 液晶为显示器件。详细描述了利
3、用 DS18B20 开发 测温系统的过程,重点对传感器在单片机下的硬件连接,软件编程以及各模块系统流程 进行了详尽分析,对各部分的电路也一一进行了介绍,该系统可以方便的实现温度采集 和显示。DS18B20 与 STC89C52 结合实现最简温度检测系统,具有硬件电路简单,控温精 度高、功能强,体积小,简单灵活等优点,可以应用于检测温度在-55到+125之间 的各种场合,有广泛的应用前景。 关键词:DS18B20;STC89C52;LCD1602 Design of temperature measurement system based on DS18B20 Abstract : This p
4、aper describes a temperature measurement system based on DS18B20.DS18B20 is used for temperature measurement, MCU-STC89C52 control the temperature measurement system,LCD1602 as the display device. A detailed description of the process of development DS18B20 temperature measurement system, focusing o
5、n hardware connected between sensor and MCU, and analysis of software programming and module system processes carried out. Each part of the circuit is also introduced one by one; the system can easily realize the temperature acquisition and display. The DS18B20 and STC89C52 combined to achieve the m
6、ost simple temperature measurement system, hardware circuit is simple, precise temperature control, powerful, small, simple, flexible, etc. It can be used to detect a variety occasions of temperature between -55 C to +125 C , have a broad application prospects. Key words: DS18B20; STC89C52; LCD1602 1 绪论 温度(temperature)是国际单位制中一个基本物理量。温度的微观概念是由大量 分子运动平均强度的表示,分子运动愈激烈其温度表现越强烈;温度的宏观概念是冷热 程度的表示,即为互为热平衡的两物体,其温度相等。温度只能通过物体随温度变化的 2 某些特性来间接测量,用来量度物体温度数值的标尺叫温标。它规定了温度的读数起点 (零点)和测量温度的基本单位。目前国际上用得较多的