目 录
1 绪论 .............................................................................................................................................1
1.1 本系统功能 ..........................................................................................................................1
1.1.1 温度测量功能 ...............................................................................................................1
1.1.2 温度采集功能 ...............................................................................................................1
1.1.3 系统工作流程 ...............................................................................................................1
1.2 本系统优点 ..........................................................................................................................2
1.2.1 线路简单 .......................................................................................................................2
1.2.2 温度精确 ........................................................................................................................2
2 系统硬件介绍 .............................................................................................................................2
2.1 本系统硬件和软件组成 .......................................................................................................2
2.1.1 硬件组成 .......................................................................................................................2
2.1.2 软件组成 ........................................................................................................................2
2.2 STC 单片机介绍 ...................................................................................................................3
2.2.1 STC 单片机功能介绍 ....................................................................................................3
2.3 DS18B20 数字温度传感器介绍 ...........................................................................................6
2.3.1 功能介绍 .......................................................................................................................6
2.3.2 DS18B20 温度传感器是存储器 ....................................................................................8
2.3.3 DS18B20 内部逻辑图 ..................................................................................................10
2.3.4 DS18B20 温度传感器读写时序 ..................................................................................10
2.3.5 DS18B20 存储器操作命令 ..........................................................................................12
2.3.6 DS18B20 温度传感器与单片机的接口电路 .......................................................................13
2.4 系统工作过程 ..................................................................................................................22
2.4.1 温度的测量 ..................................................................................................................22
2.4.2 温度的采集 ....................................................................................................................23
3 程序框图及 C 语言程序 ...........................................................................................................24
2.5.1 温度采集系统原理框图 .................................................................................................24
2.5.2 温度显示模块 .............................................................................................................24
2.5.3 读温度子程序 .............................................................................................................25
7.1.3 温度转换子程序 .........................................................................................................25
7.1.4 计算温度子程序 .........................................................................................................26
7.2 温度采集系统 C 语言程序 .................................................................................................26
结论 ...............................................................................................................................................35