1、 本科毕业设计(论文)本科毕业设计(论文) 基于单片机温度计硬件系统开发基于单片机温度计硬件系统开发 2010 2010 年年 6 6 月月 摘摘 要要 随着时代的进步和发展,单片机技术已经普及到我们生活,工作,科研,各个领域, 已经成为一种比较成熟的技术。 本文介绍了一种以单片机为主要控制器件, 以 DS18B20 为温度传感器的新型数字温度计,本温度计属于多功能温度计,可以设置上下限报警温 度,当温度不在设置范围内时,可以报警。系统主要包括硬件电路的设计和系统程序的 设计。硬件电路主要包括主控制器,测温电路和显示电路等,主控制器采用单片机 STC89C52,温度传感器采用美国 DALLAS
2、 半导体公司生产的 DS18B20,显示电路采 用 4 位共阴极 LED 数码管以动态扫描法直读显示。系统程序主要包括主程序,读出温 度子程序,温度转换命令子程序,计算温度子程序,显示数据刷新子程序,报警温度设 置子程序等。 由于采用了改进型智能温度传感器 DS18B20 作为检测元件, 与传统的温度计相比, 本数字温度计减少了外部的硬件电路,具有低成本和易使用的特点。DS18B20 温度计 还可以在高温报警、远距离多点测温控制等方面进行应用开发,具有很好的发展前景。 关键词:关键词:单片机,数字控制,DS18B20,STC89C52,数字温度计 Abstract With the progr
3、ess and development, single-chip technology has spread to our lives, work, research in various fields has become a relatively mature technology. The paper introduced one kind of new digital thermometer that take the MicroController Unit as the primary control component and take DS18B20 as the temper
4、ature sensor,the thermometer are multi-purpose thermometer, you can set upper and lower temperature alarm, when the temperature range is not set, it could be reported . The system mainly included the design of the hardware electric circuit and the design of the system program . The hardware electric
5、 circuit mainly included the master controller, the temperature measured electric circuit and the display circuit and so on, the master controller used MicroController Unit STC89C52, the temperature sensor used DS18B20 which the American DALLAS semiconductor company produces, the display circuit use
6、d 4 altogether common Cathode LED numerical tube by the dynamic scanning method straight to read the demonstration. The system program mainly included the master routine, the read-out temperature subroutine, the temperature transformation order subroutine, the calculated temperature subroutine,demonstrated the data renovates subroutine, alarm temperature setting subroutine and so on. Because used the advanced version intelligence temperature sensor DS18B20 as the examine part, compared with