Now that's the way to file a bug report! Analysis and a patch.

Applied.

Question, does the same correction need to be made for the othe DS27xx devices?

Paul Alfille

On 5/23/06, Jan Bertelsen <[EMAIL PROTECTED]> wrote:
Hello,

I've tested a DS2760 measuring a thermocouple type K and got some strange
readings. The current was many times greater than the DS2760 is designed
to  and the temperature in directory 30.xxxxxxxxxxxx/typeK/temperature
didn't match the temperature at the thermocouple.

According to the data sheet for the DS2760 (page 8) the three least
significant bits of the current register has no value (marked as x) - so I
think the current reading is a factor 8 too high and that the factor f in
function  FS_r_vis() in ow_2760.c should be divided by 8 (f = 15.625E-6 /
8).

Further I found that the special if-statement for the DS2740BU also
changed the factor f for the DS2760 when reading from directory /typeK/
(but not when reading the main directory for the DS2760), so I moved it
into the case for DS2740 (I don't know if this is the right place).

With these small changes I got a reading matching the actual temperature.

Included below is a diff of the changes.

Jan B.


[EMAIL PROTECTED] c]$ diff owfs-2.3p7/module/owlib/src/c/ow_2760.c
owfs-2.3p7/module/owlib/src/c/ow_2760.c~
555d554
<           if ( pn->ft->data.v ) f = pn->ft->data.f ; // for DS2740BU
559c558
<             f = 15.625E-6 / 8;
---
>             f = 15.625E-6 ;
567a567
>     if ( pn->ft->data.v ) f = pn->ft->data.f ; // for DS2740BU
[EMAIL PROTECTED] c]$



-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmdlnk&kid7521&bid$8729&dat1642
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers



-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to