Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[Moved] 1-wire protocol {ds18b20 temps. Sensore}

Status
Not open for further replies.

MRBehera

Newbie level 2
Newbie level 2
Joined
Jan 2, 2015
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
17
[Moved] 1-wire protocol {ds18b20 temp. sensore}

how to convert 12bit digital data from ds18b20 to degree celcius:cry:
 

Re: [Moved] 1-wire protocol {ds18b20 temp. sensore}

By a quick look on datasheet we can note that temperatures above 0oC can be divided by 16, therefore could be something like that:

Code:
 result = (float) temp / 16.0;   //calculation with 0.5 deg C resolution 
 result = (int) temp / 16  ;   //calculation with 1 degree C resolution
1820.PNG
 

Re: [Moved] 1-wire protocol {ds18b20 temp. sensore}

Hi,

datasheet... always a good idea

****
//calculation with 0.5 deg C resolution
isn´t the resolution 1/16 °?

****
The choice of values in the table is a mystery to me..
Why 0.5°, or 25.0625° ???? Does it make sense?
Why not 0°C, 0.0625°C, 1.0°C (to see the zero point, the resolution in °C and how much LSBs are 1°C...

***

Klaus
 

Re: [Moved] 1-wire protocol {ds18b20 temp. sensore}

You are absolutelly correct, I made an elementary miscalculation :bang:.
 

Re: [Moved] 1-wire protocol {ds18b20 temp. sensore}

Hello

@Andre:

No, the temperature calculation is correct as far as I can see.

**
@MRBehera:
I ask myself why you ask about 12 bit. It is more effort to generate the 12 bit from the 16 bits than using 16 bits.
The next question is: What 12 bits do you want? Upper, lower or some inbetween?


Klaus
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top