文件名称:DS18B20
介绍说明--下载内容均来自于网络,请自行研究使用
它的功能是:
1.读出当前温度值。
2.可通过按键调整报警温度上下限。按第一个键,进入温度上线调节模式,第二个键温度加,第三个键温度减,再按一下第一个键,进入温度下线调节模式,第二个键温度加,第三个键温度键,再按一下第一个键,正常显示当前温度。
3.当进入报警温度上下限调节时,红灯亮,当显示当前温度是,绿灯亮。
4.当当前温度超过上限温度时,或者低于下限温度时,蜂鸣器报警且黄灯闪烁。
需要说明的是,
一般情况下,DQ引脚应该有一个上拉电阻来拉高电平,但是我通过观察发现,初始状态下,89C52单片机的引脚都为高电平,故我将上拉电阻去除,1820与单片机正常通信,加上上拉电阻,反而不能正常通信。-Its function is to: 1. Reads the current temperature value. 2 buttons to adjust the alarm temperature upper and lower limits. Temperature on the line the first key, enter the adjustment mode, the second key temperature plus third key temperature less, click the first button, enter the temperature off the assembly line adjustment mode, the second key temperature plus the third a key temperature key, and click the first button, display the current temperature normal. Enter the alarm temperature upper and lower limits regulation, red light, display the current temperature, the green light. When the current temperature exceeds the upper limit of temperature or below the lower limit temperature buzzer alarm and flashing yellow light. It should be noted that, under normal circumstances, DQ pin should have a pull-up resistor to pull the high level, but I found through observation, the initial state, the 89C52 pin high, therefore I will pull- resistor removed 1820 microcontroller normal commun
1.读出当前温度值。
2.可通过按键调整报警温度上下限。按第一个键,进入温度上线调节模式,第二个键温度加,第三个键温度减,再按一下第一个键,进入温度下线调节模式,第二个键温度加,第三个键温度键,再按一下第一个键,正常显示当前温度。
3.当进入报警温度上下限调节时,红灯亮,当显示当前温度是,绿灯亮。
4.当当前温度超过上限温度时,或者低于下限温度时,蜂鸣器报警且黄灯闪烁。
需要说明的是,
一般情况下,DQ引脚应该有一个上拉电阻来拉高电平,但是我通过观察发现,初始状态下,89C52单片机的引脚都为高电平,故我将上拉电阻去除,1820与单片机正常通信,加上上拉电阻,反而不能正常通信。-Its function is to: 1. Reads the current temperature value. 2 buttons to adjust the alarm temperature upper and lower limits. Temperature on the line the first key, enter the adjustment mode, the second key temperature plus third key temperature less, click the first button, enter the temperature off the assembly line adjustment mode, the second key temperature plus the third a key temperature key, and click the first button, display the current temperature normal. Enter the alarm temperature upper and lower limits regulation, red light, display the current temperature, the green light. When the current temperature exceeds the upper limit of temperature or below the lower limit temperature buzzer alarm and flashing yellow light. It should be noted that, under normal circumstances, DQ pin should have a pull-up resistor to pull the high level, but I found through observation, the initial state, the 89C52 pin high, therefore I will pull- resistor removed 1820 microcontroller normal commun
(系统自动生成,下载前可以参看下载内容)
下载文件列表
DS18B20.doc