Interfacing the DS18X20/DS1822 1-Wire® Temperature Sensor in a Microcontroller E
Abstract:Thisapplicationintroducestheusertosimple1-WiresoftwareforinterfacingamicrocontrollertotheDS18B20,DS18S20,andDS18221-Wiretemperaturesensors.Forexamplepurposesinthearticle,theDS5000(8051compatible)microcontrollerisused.Softwareexamplesaregiventhatillustratetheimplementationofdelay,reset,readbit,writebit,readbyte,writebyte,ROMsearch,CRC,readtemperature,andreadscratchpadroutines.InterfacingtheDS18X20/DS18221-WireTemperatureSensorinaMicrocontrollerEnvironmentMar08,2002Abstract:Thisapplicationintroducestheusertosimple1-WiresoftwareforinterfacingamicrocontrollertotheDS18B20,DS18S20,andDS18221-Wiretemperaturesensors.Forexamplepurposesinthearticle,theDS5000(8051compatible)microcontrollerisused.Softwareexamplesaregiventhatillustratetheimplementationofdelay,reset,readbit,writebit,readbyte,writebyte,ROMsearch,CRC,readtemperature,andreadscratchpadroutines.IntroductionThereareseveralmethodsavailableforinterfacing1-WiredevicessuchastheDS18B20,DS18S20,orDS1822toamicrocontroller.Thesemethodsrangefromsimplesoftwaresolutions,tousingaSerialInterfacechipsuchastheDS2480B,