How to take value from DALLAS 18B20 using Atmega 32

122 views Asked by At

I have atmega 32 and DALLLAS 18b20. the out put of the temp sensor is digital in one wire. can any one suggest me how to read the value using ADC channel. thanks in advance.

1

There are 1 answers

1
UncleO On

As Colin_s says, the communication with the 18b20 is digital over a port pin, i.e., 0s and 1s.

Here is the datasheet for the sensor.

Here is an application note from Atmel telling you how to interface the AtMega32 with the sensor. Basically, you change the direction of the port pin to input or output at the correct times to release or control the 1-wire, send commands to the sensor, and read results from the sensor over this pin. You "bit-bang" the commands and readings by sending or reading the hex values one bit at a time, least significant bit first.