Demo application to read DS1820, DS18S20 and DS18B20 temperature-sensors with an Atmel AVR controller. 1Wire-Bus with several devices on the wire supported, parasite power-supply supported without external FET ("strong-pullup" sourced from AVR-Portpin). The source-code is for avr-gcc/avr-libc. The 1-Wire- and DS18x20- routines may be used as "library" for own developments. 1-Wire-Bus I/O-Pin can be changed during runtime.
Credits:
Peter Dannegger (some DS18x20- and most of the 1wire-code), Peter Fleury (uart-library), Colin O'Flynn (CRC-code)
P. Fleury's uart-library and P. Danneggers 1-Wire code have been slightly extended. There is not too much left from P. Dannegger's DS18x20-code but it has been the base for the presented "project". Used C. O'Flynns CRC8-Code only.
Hardware
Atmel AVR-Controller (ATmega16 and ATmega32 @ 1MHz, 2MHz, 4MHz, 8MHz internal R/C and 1,8432 MHz, 3.6864MHz ext. XTAL used for testing) DS18X20 temperature-sensors (3 DS18B20 used during development) 4,7 kOhm pull-up resistor for 1-Wire data-line UART-connection to PC