本科毕业(设计)论文
题 目 基于单片机的数字温度计设计 学 院 电子信息工程 专 业 通信工程 学生姓名 祝君 学 号 201010315222 年级 2010级 指导教师 田晓滨 职称 高级工程师
二〇一三 年 十二 月 二十 日
成都学院学士学位论文(设计)
基于单片机的数字温度计设计
专 业:通信工程 学 号:201010315222
学 生:祝君 指导教师:田晓滨
摘要:在我们的日常生活和生产过程中,常需要检测及控制温度,温度是生产过程和科学实验中经常遇到的重要参数之一。温度控制在生产过程起到相当重要的作用。温度测量是温度控制的基础,技术已经趋向简单和成熟。在设计中选用AT89S51型单片机作为主控制器件,选用DS18B20温度传感器作为测温电子元件,通过LCD1602液晶显示屏传送数据,实现温度显示。设计的内容主要分为两部分,一是对系统硬件部分的设计,包括温度采集电路、显示电路和报警电路;二是对系统软件部分的设计,应用C语言实现温度的采集与显示。通过DS18B20直接读取被测温度值,送入单片机进行数据处理,之后进行输出显示。该设计可实现多点温度采集、声音报警、报警上下限设置、温度显示、串口下载等功能。 关键词:温度;AT89S51;DS18B20
成都学院学士学位论文(设计)
Design of digital thermometer based on single chip
Specialty:Communication Engineering Student Number:201010315222
Student:Zhu jun Supervisor:Tian xiaobin
Abstract:In our daily life and production process, we often need to measure and control temperature. Temperature is one of the most frequently encountered parameters in production process and scientific experiments . Thus, the temperature detection and control are definitely vital in the forementioned or any other similar processions. As the basis of the temperature control ,the temperature measurement technology has now become simple and mature. In this design, AT89S51 single-chip is chosen as the center control and DS18B20 temperature sensor performs the temperature measurement with LCD1602 liquid crystal display to realize data transfer and values display.The main part of this design consists of two aspects. One of them is the design of the hardware of the system, including the temperature gathering electric circuit, the display circuit and the alarm circuit.The other aspect is the design of the software of the system, which includes the realization of the data collection and temperature display by the use of C language. Measured temperature value can be directly read through the DS18B20 and the data will be transferred into the single-chip. Afterwards, the single-chip will output and display the data. The design is able to achieve multi-point temperature acquisition, sound alarm, alarm limit setting, temperature display, and serial downloading,etc. Key words:Temperature;AT89S51;DS18B20
1
成都学院学士学位论文(设计)
目 录
1 绪论 .......................................................................... 1
1.1 课题的背景及目的 ........................................................ 1 1.2 国内外现状 .............................................................. 2 2 系统方案设计 .................................................................. 4
2.1 设计的研究方法及内容 .................................................... 4 2.2 测温电路方案 ............................................................ 4 2.2 显示电路方案 ............................................................ 5 2.3 系统的总体设计方案 ...................................................... 5 3 硬件设计 ...................................................................... 6
3.1 硬件电路开发工具 ........................................................ 6 3.2 单片机AT89S51 .......................................................... 6
3.2.1 AT89S51芯片简介 ................................................... 6 3.2.2 AT89S51的特性及引脚功能 ........................................... 6 3.2.3 复位电路的设计 .................................................... 9 3.2.4 晶振电路的设计 ................................................... 10 3.2.5 单片机最小系统的设计 ............................................. 10 3.3 温度传感器DS18B20 ..................................................... 12
3.3.1 芯片简介 ......................................................... 12 3.3.2 DS18B20的外形和内部结构 .......................................... 12 3.3.3 DS18B20的工作时序 ................................................ 15 3.3.4 DS18B20的各个ROM命令 ............................................ 17 3.4 测温电路的设计 ......................................................... 18 3.5 报警电路的设计 ......................................................... 18 3.6 显示电路设计 ........................................................... 19
3.6.1 LCD1602简介 ...................................................... 19 3.6.2 显示电路的设计 ................................................... 21 3.7 MAX232简介 ............................................................ 21
I
成都学院学士学位论文(设计)
3.8 RS-232接口简介 ........................................................ 23
3.8.1 RS-232接口的电平转换 ............................................. 23 3.8.2 RS-232总线接口标准 ............................................... 23 3.9串口电路的设计 ......................................................... 25 4 系统软件设计 ................................................................. 26
4.1 开发工具 ............................................................... 26 4.2 软件设计 ............................................................... 26
4.2.1 主程序模块 ....................................................... 26 4.2.2 读温度子程序 ..................................................... 27 4.2.3 报警子程序 ....................................................... 28
5 Proteus仿真 ................................................................. 30
5.1 Proteus简介 ........................................................... 30 5.2 Proteus操作简介 ....................................................... 30 5.3 Proteus测温仿真 ....................................................... 31 6 硬件的制作及系统调试 ......................................................... 33
6.1 硬件制作过程 ........................................................... 33 6.2 系统调试 ............................................................... 33 6.3 遇到的问题及解决方法 ................................................... 34 6.4 结果分析 ............................................................... 34 7 结论 ......................................................................... 36 附录1 ......................................................................... 37 附录2 ......................................................................... 38 附录3 ......................................................................... 51 附录4 ......................................................................... 52 附录5 ......................................................................... 53 参考文献 ....................................................................... 54 致谢 ........................................................................... 55
II
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库基于单片机的数字温度计的设计 - 图文在线全文阅读。
相关推荐: