On 7/22/07, Andrew Burgess <[EMAIL PROTECTED]> wrote:
I misremembered the 300 msec number. This is what my old code does:
switch(o->type) {
case TEMPERATURE_1820:
o->conversion_time = 350; // cold sensors really need this
much
break;
case TEMPERATURE_18B20:
case TEMPERATURE_1822:
o->conversion_time = 750;
break;
All determined empirically years ago. I must have never tried an 18S20.
In modules/owlib/src/c/ow_1820.c
For the DS18B20 and the newer chips
struct tempresolution Resolutions[] = {
{0x1F, 110, 0xF8}, /* 9 bit */
{0x3F, 200, 0xFC}, /* 10 bit */
{0x5F, 400, 0xFE}, /* 11 bit */
{0x7F, 1000, 0xFF}, /* 12 bit */
};
For the DS1820 and DS18S20, 1000 msec
Although the data sheet says that 750 msec is enough, there is a significant
error rate (85C) and most programs (digitemp for example) use the longer
wait.
OWFS actually polls for conversion to be complete
It's easy enough to change the tining values and test. The philosophy in
OWFS is reliability over performance.
Paul Alfille
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers