It's certainly possible to give the raw byte sequence. There is a slight
wrinkle that the DS2450 does A/D conversion either 0-2.5V or 0-5V and we use
the requested property to transparently set the correct resolution.

>From modules/owlib/src/c/ow_2450.c:

    // data conversions
    f[0] = (resolution ? 7.8126192E-5 : 3.90630961E-5) * ((((UINT) data[1])
<< 8) | data[0]);
    f[1] = (resolution ? 7.8126192E-5 : 3.90630961E-5) * ((((UINT) data[3])
<< 8) | data[2]);
    f[2] = (resolution ? 7.8126192E-5 : 3.90630961E-5) * ((((UINT) data[5])
<< 8) | data[4]);
    f[3] = (resolution ? 7.8126192E-5 : 3.90630961E-5) * ((((UINT) data[7])
<< 8) | data[6]);

Are you using a platform where floating point arithmetic is inconvenient?
I'm told the true resolution is only 8 bit even though 16bit is set, so
rounding errors are probably irrelevant.

If you want the raw reading, can you suggest a good name? A2D ? raw_read?

Paul Alfille
On Thu, May 1, 2008 at 4:25 PM, Alessio Sangalli <[EMAIL PROTECTED]> wrote:

> Hi, I am using a DS2450 to control voltages.
>
> I use a voltage divider, 33K + 10K resistors and measure the voltage in
> the middle to measure up to about 20V.
>
> I have to calibrate each ADC to get an accurate reading depending on the
> real value of the resistors.
>
> In this operation I would be more comfortable to use the raw 16bit
> reading from the sensor, is it possible to have it available or the
> DS2450 just sends the voltage reading?
>
> bye thank you
> Alessio
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
>
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to