1、 单片机原理及系统课程设计单片机原理及系统课程设计 专专 业:业:电气工程及其自动化 班班 级:级: 电气 1001 班 姓姓 名:名: 学学 号:号: 指导教师:指导教师: 2013 2013 年年 3 3 月月 7 7 日日 评语: 考勤(10) 守纪(10) 过程(40) 设计报告(30) 答辩(10) 总成绩(100) 单片机原理及系统课程设计报告 - 1 - 摘摘 要要 本文将介绍一种基于单片机控制的数字温度计。在硬件方面介绍单片机温度 控制系统的设计, 对硬件原理图做简洁的描述。系统程序主要包括主程序、读出 温度子程序、温度转换命令子程序、计算温度子程序、显示数据刷新子程序。软 硬
2、件分别调试完成以后,将程序下载入单片机中,电路板接上电源,电源指示灯 亮, 按下开关按钮, 数码管显示当前温度。 由于采用了智能温度传感器 DS18B20, 所以本文所介绍的数字温度计与传统的温度计相比它的转换速率极快,进行读、 写操作非常简便。它具有数字化输出,可测量远距离的点温度。系统具有微型化、 微功耗、测量精度高、功能强大等特点,加之 DS18B20 内部的差错检验,所以它 的抗干扰能力强,性能可靠,结构简单。 关键词:单片机,数字控制,温度计,关键词:单片机,数字控制,温度计,DS18B20DS18B20 Abstract This article introduces a micr
3、ocomputer-based control of digital thermometers from the hardware description Temperature Control system design, hardware schematics and concise description. System program includes the main program, subroutine read temperature, the temperature conversion command subroutine, subroutines calculate th
4、e temperature, display data refresh routines. Debugging of hardware and software were completed, the program downloaded into the MCU, the circuit board connected to the power supply, power indicator light, press the switch button, digital display the current temperature. As a result of smart tempera
5、ture sensor DS18B20,therefore, this article describes the traditional thermometer digital thermometer and the conversion rate compared to its fast, read, write with ease. It has a digital output, measurable distance of the point temperature. System has a micro, micro-power, high precision, powerful
6、characteristics, combined with the internal error DS18B20 test, its anti-interference ability, reliable, simple in structure. Key words: Single-chip microcomputer, digital control, thermometer, DS18B20 1 引言引言 1.1 目的设计目的设计 通过本次设计,熟悉单片机 AT89C51 和传感器 DS18B20 的应用,及单片机与 外围电路的接法,加深对单片机以及传感器的认识,了解单片机在日常生活中的 应用及其重要性。同时,通过查找资料,设计电路,使本次设计的数字温度计具 有结构简单、成本低廉、精确度高、反应速度快、数字化显示和不易损坏等特点。 单片机原理及系统课程设计报告 - 2 - 1.2 设计要求设计要求 本设计主要是应用 51 系列单片机设计一个数字温度计,该数字温度计与传统 的温度计相比,具有读数方便,测温范