单片机的数字温度计设计方案().pdf
1/9 基于数字温度传感器的数字温度计1.设计目的与要求以 AT89C51单片机为核心,利用数字温度传感器DS18B20制作一个 LED显示的数字温度计:(1 利用数字温度传感器DS18B20 测量温度信号。(2 以 P3.5 口串口传送数据。(3 温度测量范围为 099,精确到 1。(4 2位共阳极 LED数码管上显示相应的温度值。2.工作原理温度传感器 DS18B20 美国 Dallas 公司生产的单线数字温度传感器,可以把温度模拟信号直接转换成串行数字信号供微机处理,是模/数转换器件,而且读DS18B20信息或写信息仅需单线接口,使用非常方便,新型的单线数字温度传感器体积小,精度高,使用更灵活。DS18B20有三个引脚,GND接地;DQ为数字信号输入输出端;Udd 为外接电源输入端。DS18B20内结构主要由4 部分组成:64 位光刻 ROM、温度传感器、非挥发的温度报警触发器TH、TL和配置寄存器。3.参考电路 附图)本设计由DS18B20温度传感器芯片测量当前的温度并将转换后的结果送入单片机。然后通过A89S51单片机驱动两位共阳极7 段 LED数码管显示测量温度值。如本设计硬件电路图所示,本电路主要有DS18B20温度传感器芯片,两位共阳极数码管,AT89S51单片机及相应外围电路组成。其中DS18B20采用“一线制”与单片机相连。整体硬件接线图2/9 初始化状态显示文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F13/9 4.软件设计 流程图)用汇编语言完成对设计的软件编程,程序开始首先对温度传感器DS18B20进行复位,检测是否正常工作;接着读取温度数据,主机发出CCH指令与在线的 DS18B20联系,接着向 DS18B20发出温度 A/D 转换 44H指令,再发出温度寄存器的温度值BEH指令,并反复调用复位,写入及读取数据子程序,之后再经过数据转换,由数码管显示出来,不断循环。软件编程主要包括以下一些程序段。主程序,读出转换后的温度值,写DS18B20的程序,读 DS18B20的程序,从DS18B20中读出两个字节的温度数据,将从DS18B20中读出的温度数据进行转换,将16进制的温度数据转换成压缩BCD码,DS18B20初始化程序,数码显示程序,延时子程序。5.仿真结果与结论仿真时运行电路则各器件正常运行,并显示出温度值,调节温度传感器度温度值,将显示出不同的温度值。温度显示整体电路文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F14/9 温度显示局部电路文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F15/9 附录:程序语言如下:。DS18B20测温程序,高位存入 35H(TEMPER_H RE00:MOV R2,#8 RE01:CLR C SETB DQ NOP NOP CLR DQ NOP NOP NOP SETB DQ MOV R3,#7 DJNZ R3,$MOV C,DQ MOV R3,#23 DJNZ R3,$RRC A 文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F17/9 DJNZ R2,RE01 MOV R1,A DEC R1 DJNZ R4,RE00 RET 。*。将从 DS18B20中读出的温度数据进行转换。*TEMPER_COV:MOV A,#0F0H ANL A,TEMPER_L。舍去温度低位中小数点后的四位温度数值SWAP A MOV TEMPER_NUM,A。得到低四位MOV A,TEMPER_L JNB ACC.3,TEMPER_COV1。四舍五入去温度值INC TEMPER_NUM TEMPER_COV1:MOV A,TEMPER_H ANL A,#07H SWAP A ORL A,TEMPER_NUM。得到高四位,再与低四位相或得到值MOV TEMPER_NUM,A。保存变换后的温度数据LCALL BIN_BCD RET。*。将16进制的温度数据转换成压缩BCD码。*BIN_BCD:MOV A,TEMPER_NUM MOV B,#10 DIV AB MOV TEMPER_SHI,A MOV TEMPER_GE,B RET。*。DS18B20初始化程序。*INIT_1820:SETB DQ NOP CLR DQ MOV R0,#250 TSR1:DJNZ R0,TSR1。延时520us 文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F18/9 SETB DQ MOV R0,#25H。96US-25H TSR2:DJNZ R0,TSR2 JNB DQ,TSR3。如D0为低则复位成功,DS18B20存在LJMP TSR4。延时TSR3:SETB FLAG1。置标志位,表示DS1820存在LJMP TSR5 TSR4:CLR FLAG1。清标志位,表示DS1820不存在LJMP TSR7 TSR5:MOV R0,#06BH。200US TSR6:DJNZ R0,TSR6。延时TSR7:SETB DQ。拉高总线RET 。*。数码显示程序。*LEDDISP:MOV DPTR,#TAB MOV A,TEMPER_GE MOVC A,A+DPTR MOV P1,A SETB P2.1 ACALL YSH2S CLR P2.1 MOV A,TEMPER_SHI MOVC A,A+DPTR MOV P1,A SETB P2.0 ACALL YSH2S CLR P2.0 RET TAB:DB 0C0H,0F9H,0A4H,0B0H,099H,092H,082H,0F8H,080H,090H。*。延时子程序。*YSH2S:MOV R3,#01H 文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F19/9 LOOP1:MOV R4,#028H LOOP2:MOV R5,#05AH XHD3:DJNZ R5,XHD3 DJNZ R4,LOOP2 DJNZ R3,LOOP1 RET D500us:MOV R6,#250。延时 500us DJNZ R6,$RET DELAY1:MOV R7,#20H DJNZ R7,$RET END 文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M4T4F1文档编码:CN5G5N4Z1P10 HT2M9U8A1Z1 ZX5E4M