Thanks Christian - all my devices are working now. I'm giving the 4relay aag
board the flick - something very flaky with it. Have replaced it with a 2406
relay which works perfectly...
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Christian Magnusson
Sent: Friday, 4 May 2007 5:03 PM
To: [email protected]
Subject: Re: [Owfs-developers] DS2760 - two bugs
2.6p4-5 to the nslu2 is built from the latest CVS-version now.
/Christian
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Lorenz
Drack
Sent: den 3 maj 2007 15:32
To: [email protected]
Subject: Re: [Owfs-developers] DS2760 - two bugs
thanks Paul - I was having the same problem with my 2760. what version
number should I look for when it gets ported to the slug?
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul
Alfille
Sent: Thursday, 3 May 2007 11:25 AM
To: [email protected]
Subject: Re: [Owfs-developers] DS2760 - two bugs
Ok, I see part of the problem: The DS2760 stores data highbyte/lowbyte and
the DS2438 stores data lowbyte/highbyte. I was trying to reduce repetetive
code between these very similar chips and missed this nuance. It effects
voltage readings, temperature, and current. Fixed in the CVS.
Paul Alfille
On 5/2/07, Jan Bertelsen <[EMAIL PROTECTED]> wrote:
Hi all,
running 2.6p4 on a FC5 I get some wrong readings from a DS2760 (like -31 C
as room temperature...)
Bug 1
After some debugging I found that OW_r_int(...) (line 886 in ow_2760.c) is
returning the temperature bytes from DS2760 in reversed order. OW_r_int
has another way of reading the bytes (line 1043 in ow_2760.c) but this is
commented out.
Swapping comment of line 1043 and 1044 in ow_2760.c gives the right
temperature reading, but I can't figure out if this is the right way to do
it or if there is a general bug in UT_int16() (or maybe OW_r_sram()).
Bug 2
But still I get the wrong thermocouple temperature. After some more
debugging I realized that an old bug has been reintroduced (see e-mail
from 5/23/06): FS_r_vis() has a special if-statement for DS2740BU (line
617,618 in ow_2760.c) which is only relevant for DS2740BU (or am I
wrong?).
After moving it to the case-statement of DS2740 (as it was in version
2.3p7) I got the right readings from the thermocouple.
Does anybody know why this if-statement has been moved??
A diff of my changes is included below.
Jan B.
[EMAIL PROTECTED] c]$ diff ow_2760.c ow_2760.c_org
603,604d602
< if (pn->ft->data.v)
< f = pn->ft->data.f; // for DS2740BU
618a617,618
> if (pn->ft->data.v )
> f = pn->ft->data.f; // for DS2740BU
1043,1044c1043,1044
< I[0] = (((int)((int8_t)i[0])<<8) + ((uint8_t)i[1]) ) ;
< //I[0] = UT_int16(i);
---
> //I[0] = (((int)((int8_t)i[0])<<8) + ((uint8_t)i[1]) ) ;
> I[0] = UT_int16(i);
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers