1、 基于 51 单片机设计简单的温度计 摘要 随着科技的不断发展,电子设备的应用已经取得了非凡的成就。即使是高度集成化 的今天,单片机技术依旧在我们的日常生活中占据着重要的地位。温度是日常生活、工业、 医学、环境保护、化工、石油等领域最常用到的一个物理量。测量温度的基本方法是使用温 度计直接读取温度。 最常见到得测量温度的工具是各种各样的温度计。 它们常常以刻度的形 式表示温度的高低, 人们必须通过读取刻度值的多少来测量温度。 利用单片机和温度传感器 构成的电子式智能温度计就可以直接测量温度,得到温度的数字值,既简单方便,有直观准 确。本文讲叙了一种基于 51 系列单片机的数字温度计的设计过程与
2、仿真结果。通过 Proteus 画图以及 Keil 编程,成功的仿真出了能够实时测量温度并显示温度的数字温度计。 关键字单片机,温度计,仿真,A T89C52,DS18B20 The Design of The Intelligence IC card Ammeter Abstract With the continuous development of science and technology,the application of electronic equipment has made remarkable achievementsEven the highly integrated
3、 single-chip technology today,still in our daily life plays an important role in Temperature is the daily life, industry, medicine, environmental protection,chemical industry,petroleum and other areas of the most commonly used of a physical quantityTemperature measurement is the basic method used to
4、 directly read temperature thermometer The most common to measuring the temperature of the tool is various thermometerThey often graduated form high and low temperature, people must read through the scale value number to measure temperatureUsing single chip computer and a temperature sensorThe elect
5、ronic type intelligent thermometer can measure temperature,the temperature of the digital values,are simple and convenient, is intuitive and accurate This article tells of a microcontroller based on the Series 51 digital thermometers design process and simulation resultsThrough the Proteus drawing a
6、nd keil programming,a successful simulation of a real-time temperature measurement and display the temperature of the digital thermometer。 Keywords:Single-chip Microcomputer,Thermometer,simulation,AT89C52, DS18B20。 目 录 1 引言 . 3 1.1 设计的目的 4 1.2 设计的背景 4 2 方案设计 . 4 2.1 DS18b20 的选取 4 2.2 AT89C51 单片机的选取 2 2.3 LCD1602 液晶的选取 2 3 硬件设计 . 5 3.1 时钟电路 5 3.2 复位电路 3 3.3 DS18b20 温度传感电路 7 3.4 1602 液晶显示电路 . 4 4 软件设计 . 8 4.1 DS18b20 与单片机之间的信息交换程序 . 9 4.2 单片机向 1602 发送命令及数据的程序 . 7 4.3 主函数对各子函数的调用过程 7 5 仿真