文档介绍:基于DS18B20的多路温度检测系统的
设计与实现
摘要
为了达到测量和检测多处温度值,就要求主系统连接多个温度传感器,由于主系统和配件之间连接器上的空闲引脚通常极为有限,要想在不增加连接器复杂度和成本的条件下给系统增加外设识别和控制功能就成为一项极具挑战性的任务。作为拥有1-Wire的DS18B20器件能够满足这些要求。本设计采用多个DS18B20连接在于同一条单线总线上,这可以在许多不同的地方放置多个DS18B20温度传感器进行温度检测。通过用单片机来实现对多个DS18B20的控制,从而实现温度检测,实现报警。显示部分采用了七段数码显示管进行显示,可同时对时间和温度进行显示方便观察。键盘通过对89C51的P1口直接编程来实现。
关键词:1-Wire;串行总线;七段数码显示管;温度测量
The design and implementation of the multi-temperature detection system based on DS18B20
Abstract
In order to achieve measurement and testing various temperature,It requires the main system linked to a number of temperature sensors,As the main system and accessories between the connector pins are usually very limited spare, not to increase the plexity and cost of the conditions to increase the peripheral system to identify and control has e one of the greatest challenges of with 1 - Wire the DS18B20 device can meet these requirementsThis design uses a number of DS18B20,what connected with a one-way bus,which can in many different places at various DS18B20 temperature sensor to detect achieve through the use of multiple DS18B20 control, thus realizing the temperature detection,and alarm. Demonstrate a part having adopt seven section of digital display tube to carry out the convenient observation demonstrating, but carrying out display on time and the temperature at the same keyboard through the P1 port direct programming to achieve.
Key words: 1-Wire; Serial Bus ; Seven section of digital display tube; temperature survey
目录
摘要 I
ABSTRACT II
1 绪论 1
概述I2C总线的应用 1
概述单总线的应用 1
本设计的结构安排 2
2 串行总线 3
I2C总线 3
I2C总线工作原理 3
I2C总线数据传送 3
单总线 4
单总线多节点系统 4
单总线数据通信 5
3 硬件设计 6
本设计系统结构框图 6
系统的原理图 7
单片机及其管脚说明 7
用I/O口实现I2C总线协议 9
DS18B20的读写程序和单总线协议的实现 10
单片机外围电路 14
键盘 14
报警 15
三极管的简介 15
七段数码显示管 16
看门狗的原理 18
晶振电路原理 19
4 软件设计 20
工作方案简介 20
主程序流程图 21
功能模块 22
由DS18B20完