Interfacing the DS18X20/DS1822 1-Wire® Temperature Sensor in a Microcontroller Environment

Abstract: This application introduces the user to simple 1-Wire software for interfacing a microcontroller to the DS18B20, DS18S20, and DS1822 1-Wire temperature sensors. For example purposes in the article, the DS5000 (8051 compatible) microcontroller is used. Software examples are given that illustrate the implementation of delay, reset, read bit, write bit, read byte, write byte, ROM search, CRC, read temperature, and read scratch pad routines.