Am 13.07.2013 20:21, schrieb Jerry Scharf:
> 
> The origin of 85 was that the original sensors were 8 bit and only went 
> to 85c and thus all 1s (FF)was an error. When the extended the range to 
> 125c and the bits extended, the error value was already set and produces 
> the problem you have. Hind sight says they should have used the extra 
> byte up front and sent an out or range number, but that doesn't help now.
> 
> I know of no way to tell the difference between an error and an 85c 
> reading, others may be smarter about this.
> 
The data sheet of the DS18B20 doesn't say anything about 85°C being an
error value. Rather it says 85°C ist the *power-on-reset* value of the
temperature register when no conversion was done yet (page 4, table 2).

In addition, in page 5 the datasheet states

"
However, when the DS18B20 is performing temperature conversions or
copying data from the scratchpad memory to EEPROM, the operating current
can be as high as 1.5mA. This current can cause an unacceptable voltage
drop across the weak 1-Wire pullup resistor and is more current than can
be supplied by CPP. To assure that the DS18B20 has sufficient supply
current, it is necessary to provide a strong pullup on the 1-Wire bus
whenever temperature conversions are taking place or data is being
copied from the scratchpad to EEPROM. This can be accomplished by using
a MOSFET to pull the bus directly to the rail as shown in Figure 4. The
1-Wire bus must be switched to the strong pullup within
10ms (max) after a Convert T [44h] or Copy Scratchpad [48h] command is
issued, and the bus must be held high by the pullup for the duration of
the conversion (tconv) or data transfer (twr = 10ms). No other
activity can take place on the 1-Wire bus while the pullup is enabled.
"

That's why we always ask about parasite power or not. When you read 85°C
after performing a parasite-powered conversion, that may mean the chip
has been *power-cycled*. If you have more than one parasitic-powered
chip on the bus, they obviously could have been all power-cycled because
of the bus-power problem. The same can happen when the bus is shorted
somehow or the busmaster does something completely wrong.

---

So when it is certain there was no power-cycle, the 85°C reading means
85°C. The DS18B20 has no distinct POR flag, be fortunately we can
simulate one:

The scratchpad RAM with the Th, Tl and control register contents is
reset to the EEPROM contents on power-cycling. So these values can be
used to get a POR flag. Store values of your choice into the EEPROM
once. During normal operation, the first thing you do is adjusting these
default values in the scratchpad RAM to something else. Once you get a
85°C reading, you can now check the scratchpad RAM to tell away the POR
condition.



I see currently owfs is unable to update the scrachpad RAM only, as it
would be neccessary to implement such a scheme. Paul, what do you think
about having a node which does the "Write Scratchpad" command, but
leaves out the "Copy scratchpad" command?


Kind regards

        Jan





------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to