基于AT89C52单片机的数字温度计设计
- 格式:doc
- 大小:2.18 MB
- 文档页数:59
I 基于单片机的数字温度计设计
摘 要
在日常生活及工业生产过程中,经常要用到温度的检测及控制,温度是生产过程和科学实验中普遍而且重要的物理参数之一。传统的测温元件有热电偶和二电阻。而热电偶和热电阻测出的一般都是电压,再转换成对应的温度,这些方法相对比较复杂,需要比较多的外部硬件支持。我们用一种相对比较简单的方式来测量。我们采用美国DALLAS半导体公司继DS18B20之后推出的一种改进型智能温度传感器DS18B20作为检测元件,温度范围为-55~125℃,最高分辨率可达0.0625℃。DS18B20可以直接读出北侧温度值,而且采用三线制与单片机相连,减少了外部的硬件电路,具有低成本和易使用的特点。本文介绍一种基于AT89C52单片机的一种温度测量及报警电路,该电路采用DS18B20作为温度监测元件,测量范围0℃~+100℃,使用LCD模块显示,能设置温度报警上下限。正文着重给出了软硬件系统的各部分电路,介绍了集成温度传感器DS18B20的原理,AT89C52单片机功能和应用。该电路设计新颖、功能强大、结构简单。
关键词:温度测量,AT89C52,DS18B20,系统仿真
II Design of Digital Thermometer Based on SCM
ABSTRACT
In daily life and industrial production process, often used in the detection and control
of temperature, temperature is the production process and scientific experiments in
general and one of the important physical parameter. Traditional thermocouple and
temperature components are the second resistor. The thermocouple and thermal
resistance are generally measured voltage, and then replaced by the corresponding
temperature, these methods are relatively complex, requiring a relatively large number
of external hardware support. We use a relatively simple way to measure. We use the
United States following DALLAS Semiconductor DS1820 improved after the
introduction of a smart temperature sensor DS18B20 as the detection element, a
temperature range of -55℃~125℃, up to a maximum resolution of 0.0625℃. DS18B20
can be directly read out the temperature on the north side, and three-wire system with
single-chip connected to a decrease of the external hardware circuit, with low-cost and
easy use. The introduction of a cost-based AT89C52 SCM a temperature measurement
circuits, the circuits used DS18B20 high-precision temperature sensor, measuring scope
0℃~+100℃, can set the warning limitation, the use of seven segments LCD that can be
display the current temperature. The paper focuses on providing a software and
hardware system components circuit, introduced the theory of DS18B20, the functions
and applications of AT89C52 .This circuit design innovative, powerful, can be
expansionary strong.
KEY WORDS: Temperature measurement,AT89C52,DS18B20,System simulation
III 目 录
前 言 ................................................................................................ 1
第1章 绪论 ...................................................................................... 2
1.1 设计背景 ............................................................................... 2
1.1.1 温度计的介绍 ............................................................. 2
1.1.2 温度传感器的发展状况 .............................................. 3
1.2 选题的目的和意义 ............................................................... 4
1.2.1 选题的目的 ................................................................. 4
1.2.2 选题的意义 ................................................................. 4
第2章 系统概述 ............................................................................... 5
2.1 设计方案的选择 ................................................................... 5
2.1.1 方案一 ......................................................................... 5
2.1.2 方案二 ......................................................................... 6
2.2 系统设计原理 ....................................................................... 6
第3章 系统硬件的设计 ................................................................... 8
3.1 AT89C52的介绍 .................................................................... 8
3.2 DS18B20的介绍 ................................................................. 11
3.2.1 DS18B20的引脚排列 ................................................ 11
3.2.2 DS18B20内部结构 .................................................... 12
3.2.3 DS18B20的测温原理 ................................................ 16
3.2.4 DS18B20使用的注意事项 ........................................ 17
3.3 数字温度计电路设计 ......................................................... 18
3.3.1 数字温度计原理图 ................................................... 18
3.3.2 时钟电路的设计 ....................................................... 18
3.3.3 复位电路的设计 ....................................................... 19
3.3.4 接口电路的设计 ....................................................... 20
3.3.5 显示电路的设计 ....................................................... 20
3.3.6 报警电路的设计 ....................................................... 23
第4章 系统软件的设计 ................................................................. 24