1、 摘 要 随着现代信息技术的飞速发展,在生产中温度的准确测量是一个比较困难的事情从最初 的酒精、水银温度计到现在的数字化、集成化的温度检测系统。可见传感器的发展是飞快的。 它快速的发展必将带来新一轮的工业化的革命和社会发展的飞跃。 本文从硬软件两个方面介绍了基于 AT89S52 单片机温度自动检测系统的设计。系统硬件 由控制电路、温度采集电路、键盘和 LED 显示电路组成。软件设计从设计思路、软件系统框 图出发,先介绍整体的思路后,再逐一分析各模块程序算法的实现,最终编写出满足任务需 求的程序。最终通过 DS18B20 采集温度并显示出来,由此对周围环境的温度进行有效检测与 报警。基本上满足了
2、温度检测与报警的要求,具有超调量小,采样值与设定值基本一致,操 作简单等优点。 本设计创新点在于采用数字式温度传感器 DS18B20 作为感温元件, 占用单片机引脚少, 因而可以利用空余引脚通过软件模拟和温度显示。 关键词关键词:温度检测;AT89S52; LED 显 示器;DS18B20 温度 传感器 ABSTRACT With the rapid development of modern information technology, accurate measurement of temperature in the production is a difficult thing fr
3、om the initial alcohol, mercury thermometer to the present digital, integrated temperature detection system. Visible sensor development is fast. Its rapid development will bring about a new round of industrial revolution and a leap of social development. This paper introduces the design of automatic
4、 detection system of temperature based on AT89S52 from two aspects of hardware and software. The system hardware consists of control circuit, temperature acquisition circuit, keyboard and LED display circuit. Software design from the design ideas, software system block diagram, first introduced the
5、overall idea, and then one by one to analyze the implementation of each module program algorithm, and ultimately to write programs to meet the needs of the task. Finally through the DS18B20 collection temperature and display, the surrounding environment of the temperature for effective detection and
6、 alarm. Basically meet the requirements of temperature detection and alarm, with a small overshoot, the sampling value and the set value is basically the same, easy to operate and so on. The design innovation is the use of digital temperature sensor DS18B20 as a temperature sensor, the use of single-chip pin, and thus can be used in the spare pin through the software simulation and temperature display. Key word:Temperature detection ;LED AT89S52 display; DS18B20 temperature sensor 目 录 引言 . 1 1