摘 要
DS18B20是一種可組網的高精度數字式溫度傳感器,由于其具有單總線的獨特優點,可以使用戶輕松地組建起傳感器網絡,并可使多點溫度測量電路變得簡單、可靠。本文介紹了單線數字溫度傳感器DS18B20的特點和工作原理以及DS18B20數字溫度傳感器在單片機下的硬件連接及軟件編程。多個溫度傳感器DS18B20通過單總線結構連接到單片機的一個雙向口,單片機和微機通過串口連接。
該系統由測溫模塊和顯示模塊兩大部分組成。本文主要設計了測溫模塊部分。測溫模塊部分實現溫度的檢測并提供標準RS232通信接口。顯示模塊部分使用了通用PC。芯片使用了ATMEL公司的ATMEGA32單片機和DALLAS公司的DS18B20數字溫度傳感器。
該系統可應用于倉庫測溫、樓宇空調控制和生產過程監控等領域。
關鍵字:溫度測量;單總線;數字溫度傳感器;單片機
ABSTRACT
As a kind of high-accuracy digital net temperature sensor DS18B20 can be used building a sensor net easily. It can also make the net simple and reliable with it's special 1-wire interface .This paper introduces the characteristics and working principle of a 1-wire interface digital sensor DS18B20 and the application of DS18B20 with single chip processor. A number of sensors are connected to a port of the single chip processor. The single chip processor is connected to a PC through the serial interface. The system is constituted by two parts the temperature measured part and displayed part. This paper main design the temperature measured part .The temperature measured part has a RS232 interface. The displayed part uses PC. It used ATmega32 of ATMEL company and DS18B20 of DALLAS company .This system is applied in such domains as warehouse detecting temperature air-conditioner controlling system in building and supervisory productive process etc. Keywords:temperature measure; single bus; digital thermometer ; single chip processor