- Published: Saturday, 04 April 2009
- Written by Digital DIY
- Hits: 16959
There are 3 digital temperature sensors, so be sure to get the correct one. There is the 1820, 18S20 and 18B20. The 18S20 is the successor to the 1820, and does not drift over time. The 18B20 does offer faster conversions, but for me, the 18S20 more more readily available, and suits my applications fine. Be aware that the 18B20 does require different methods of temperature conversion then that described in this manual for the 18S20.
The basic wiring diagram
Be sure to attach the pull-up resistor to the databus, this is a requirement of the Dallas 1-Wire system. This code communicates with the 18S20 with its 64 bit address, you can attach multiple units to the databus, but be sure that you know the 64 bit address so that the correct device is addressed. To ascertain what the device's 64 bit address is, see the 1 Wire introduction section. Be aware that the 64 bit address information is the inner 8 pieces of information in the serial commands, the first and last piece's of information are commands for the device addressed.