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.
Asked
Active
Viewed 110 times
1
-
1http://electronics.stackexchange.com/ could be a better place to ask ... – Batuu Jan 30 '17 at 12:09
-
2If it's a digital signal coming out of the 18b20, you don't need an ADC to read it. You will need to implement the correct protocol, probably bit banging it. – Colin Jan 30 '17 at 12:13
1 Answers
2
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.

UncleO
- 8,299
- 21
- 29
-
thanks to u. i have found a library file for dallas 18b20. now i m working to integrate and use it using PD7. – Md . Sojib Ahmed Jan 30 '17 at 19:41