摘 要:随着时代的进步和发展,单片机的应用正在不停地走入到我们的生活中,因为它具有功能强,体积小,功耗低,价钱便宜,工作可靠,使用便利等特点,特别适用于与控制有关的系统设计。73172
本文用AT89C51单片机为核心控制器件,结合DS18B20传感器设计一种数字温度计,并用数码管具体显示测量的结果。本文的硬件设计主要包括温度传感器系统、报警电路和显示电路,软件流程主要有主程序、温度转换命令子程序、计算温度子程序、键盘扫描流程图。最后用Keil软件进行编译,并用Proteus软件完成性能仿真测试。当测量温度超过设定温度的上限和下限时,LED灯闪烁并实行报警。该数字温度测量仪具有测量精确、误差小、功能较强等功能。
毕业论文关键词:AT89C51单片机,DS18B20,温度计,上下限报警
Abstract: With the progress of The Times and development of the application of single chip microcomputer, is continuously to further, because it has a strong function, small volume, low power consumption, the price is cheap, reliable work, use is convenient wait for a characteristic, especially suitable for related control and system design。
This paper using the single chip microcomputer AT89C51 as the core control device, combining DS18B20 sensors completed a digital thermometer design, measuring results by the Digital tube display。 In this paper, the hardware design mainly includes the temperature sensor system, alarm circuit and display circuit, software flow are the main program, temperature conversion command subroutine, the flow chart of calculating temperature subroutine, keyboard scanning。 Finally using Keil software compiled and Proteus software to complete performance simulation test。 When measuring temperature more than set the temperature of the upper and lower limit, LED lights flashing alarm。 The digital temperature measuring instrument design has a measurement accuracy, small error, strong function, and other functions。
Key words: AT89C51 microcontroller, DS18B20, thermometer,Upper Limit Alarm
目 录
1 引言 4
1。1 课题设计的背景和意义 4
2 设计要求与方案论证 6
2。1 设计要求 6
2。2 单片机芯片的选择方案和论证 6
2。3 温度传感器设计方案论证 7
2。4 电路设计最终方案决定 8
3 主要元件介绍 8
3。1 AT89C51介绍 8
3。2 DS18B20传感器介绍 11
3。3 数码管介绍 14
4 系统硬件电路设计 15
4。1 系统整体电路图 15
4。2 温度传感器电路设计 15
4。3 报警电路设计 17
4。4 显示电路设计 18
5 系统软件设计 18
5。1 主程序 18
5。2 读出温度子程序 20
5。3 温度转换命令子程序 20