PDA

View Full Version : Fahrenheit with DS1820



Pedro Pinto
- 3rd November 2009, 23:52
Hello
I use the sample from Ressource for temperatur meassure with DS1820 and it works. Now i need to show not in celsius but in Fahrenheit. Have anyone a idea how to do that?

Thanks

Best regards
Pedro

Darrel Taylor
- 4th November 2009, 01:56
Here's one way ...
Sign = TempC.15 ; convert to Fahrenheit
TempF = ABS(TempC) */ 461
if Sign then TempF = -TempF
TempF = TempF + 32

; TempF is a signed word