David Lissiuk pointed out that my assumptions about the DS18x20's behavior
were incorrect. This may explain the rare problems with conversion,
especially when powered and unpowered sensors were mixed.
Basicallly, during powered temperature conversion, the bus is still unusable
because the data line is help low until a temperature is ready. I suspect
this is an early design decision, since the DS2450 will free the bus for
powered voltage conversions if you issue a reset.
Anyways, now setting /simultaneous/temperature to non-zero willl trigger a
conversion. The "write" will not return until the conversion is complete.
During that time, the bus is locked and polled.
Paul Alfille
On 12/11/06, Alfille, Paul H.,M.D. <[EMAIL PROTECTED]> wrote:
Actually, all the chips get the convert command (it's directory-specific,
so DS2409 branches won't get the convert unless requested specifically).
When later going to read a temperature, the following algorithm is used:
1. If there is a cached value that hasn't expired, it iis used.
2. If the device is unpowered, a conversion is issued,
1. The bus locked for the full conversion time.
2. The thread pauses for the full time.
3. The value is then read (and cached).
3. If the device is powered, and a simultaneous was done recently,
the value is read immediately.
1. The request waits until the conversion started by
"simultaneous" is ready.
2. The value is cached.
4. If the device is powered, and no valid "simultaneous" was done, a
convert is issued.
1. Since the device is powered, the bus is NOT locked for the
full time
not true any more
1. The DEVICE is locked, until the conversion is done
now it's the bus that's locked.
1. The device reading thread pauses until the conversion is done.
doesn't need to, the "simultaneous" call did the wait.
1. The value is then read (and cached).
Paul Alfille
------------------------------
*From:* [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED] *On Behalf Of *Ben Griffith
*Sent:* Monday, December 11, 2006 9:35 PM
*To:* [EMAIL PROTECTED]; owfs-developers@lists.sourceforge.net
*Subject:* Re: [Owfs-developers] temperature sensors - simultaneous
and"pre-reading"
I just tried it by adding an unpowered sensor to my net and doing the
following...
echo 1 > simultaneous/temperature
cat 10.*/temperature
The result was that it paused to do the conversion on the one unpowered
sensor, and all the powered ones came up right away. The unpowered sensor
probably tries to do the conversion with all the powered ones, but since the
data bus isn't being held high the conversion fails.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers