单片机课程设计方案—数字温度计.pdf
《单片机课程设计方案—数字温度计.pdf》由会员分享,可在线阅读,更多相关《单片机课程设计方案—数字温度计.pdf(22页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、1/22 1 课题任务、功能要求说明及总体方案介绍1.1 课题目的随着社会的发展,温度的测量及控制变得越来越重要。本文采用单片机STC89S52设计了温度实时测量及控制系统。单片机STC89S52 能够根据温度传感器 DS18B20 所采集的温度在数码管上实时显示,通过控制从而把温度控制在设定的范围之内。所有温度数据均通过4 位数码管 LED显示出来。系统可以根据时钟存储相关的数据。通过该课程的学习使我们对计算机控制系统有一个全面的了解、掌握常规控制算法的使用方法、掌握简单微型计算机应用系统软硬的设计方法,进一步锻炼同学们在微型计算机应用方面的实际工作能力。1.2 功能要求说明设计一个具有特定
2、功能的数字温度计。该数字温度计上电或按键复位后能自动显示系统提示符“P.”,进入准备工作状态。测量温度范围0 99,测量精度小数点后两位,可以通过开始和结束键控制数字温度计的工作状态。1.3 设计课题总体方案介绍及工作原理说明1.3.1 设计课题总体方案(1根据设计要求,选择 AT89C52单片机为核心器件。(2温度检测器件采用DS18B20数字式温度传感器。与单片机的接口为P3.6 引脚。(3键盘采用独立式按键,由三个按键组成,分别是:设置键SET),加一建+1),确认键 SET 键+1 键RET键确认键):当该键按下时,指向下一个要调整的位。通过P0.3引脚接入。2/22 1.3.2 工作
3、原理说明本课题以是80S52 单片机为核心设计的一种数字温度控制系统,利用温度传感器DS18B20可以直接读取被测温度值,进行转换的特性,模拟温度值经过DS18B20处理后转换为数字值,然后送到单片机中进行数据处理,并与设置的温度报警限比较,超过限度后通过扬声器报警。同时处理后的数据送到 LED中显示。文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X
4、1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I
5、3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6
6、O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z
7、1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z1
8、0I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3
9、P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R
10、8Z1X1S3 ZH2U6Z10I3E33/22 2 硬件系统的设计2.1 课题硬件系统各模块功能简要介绍硬件电路设计总体框图为图1:图 1 2.1.1 主控制器单片机 AT89S52具有低电压供电和体积小等特点,四个端口只需要两个口就能满足电路系统的设计需要,使用Atmel公司高密度非易失性存储器技术制造,与工业80C51 产品指令和引脚完全兼容。片上Flash 允许程序存储器在系统可编程,亦适于常规编程器。很适合便携手持式产品的设计使用。2.2.2 显示电路显示电路采用四位共阳LED数码管,从 P3口 RXD,TXD 串口输出段码。2.2.3 温度传感器DS18B20是美国DALLAS半导
11、体公司最新推出的一种改进型智能温度传感器,与传统的热敏电阻等测温元件相比,它能直接读出被测温度,并且可根据实际要求通过简单的编程实现位的数字值读数方式。DS18B20的性能特点如下:?独特的单线接口仅需一个端口引脚进行通讯?简单的多点分布应用?无需外部器件?可通过数据线供电?零待机功耗?测温范围-55+125,以 0.5 递增。华氏器件-67+2570F,以0.90F递按键输入电路时钟电路复位电路电源电路单片机LED 显示器驱动电路4 位 LED显示器温度检测文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S
12、3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E
13、3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4
14、Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X
15、1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I
16、3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6
17、O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z
18、1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E34/22 增?温度以 9 位数字量读出?温度数字量转换时间 200ms 典型值)?用户可定义的非易失性温度报警设置?报警搜索命令识别并标志超过程序限定温度温度报警条件)的器件。DS18B20 内部结构主要由四部分组成:64位光刻ROM、温度传感器、非挥发的温度报警触发器 TH 和TL、配置寄存器。DS18B20 的管脚排列、各种封装形式如图2所示,DQ 为数据输入/输出引脚。开漏单总线接口引脚。当
19、被用着在寄生电源下,也可以向器件提供电源;GND 为地信号;VDD 为可选择的 VDD 引脚。当工作于寄生电源时,此引脚必须接地。其电路图如图2所示.。图2外部封装形式在仿真软件中如图 3所示图3 DS18B20的测温原理如图4 所示,图中低温度系数晶振的振荡频率受温度的影响很小用于产生固定频率的脉冲信号送给减法计数器1,高温度系数晶振随温度变化其震荡频率明显改变,所产生的信号作为减法计数器2 的脉冲输入,图中还隐含着计数门,当计数门打开时,DS18B20就对低温度系数振荡器产生的时钟脉冲后进行计数,进而完成温度测量.计数门的开启时间由高温度系数振荡器来决定,每次测量前,首先将-55 所对应的
20、基数分别置入减法计数文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编
21、码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6
22、 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3
23、ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文
24、档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9
25、D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S3 ZH2U6Z10I3E3文档编码:CH3P6O4Z9D6 HS8R8Z1X1S
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 单片机 课程设计 方案 数字 温度计
限制150内