It's maybe easiest just to check which is larger
and then do the appropriate subtraction...
It looks like what you are getting is a "negative"
16bit int (where the top bit is set because the
subtraction "wrapped-around") converted into a
positive float.
You might also check the MPS manual to see if you
can set up an ADC with differential input. I think
the ATMEGA has options for this.
MS
manu suryavansh wrote:
Hi,
I am using tmote sky and want to measure differential voltage so I am
connecting V+ and V- to ADC1 and ADC2 on the tmote sky and then I am
taking the difference between the two adc values but I am getting values
like 65416.0 for the difference so I wanted to know is there any
function which gives the absolute value of the difference (modulus of
the difference) . I think this is the problem.
Is this correct?
Thank you
Manu Suryavansh
University of Florida
------------------------------------------------------------------------
Now that's room service! Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel
<http://travel.yahoo.com/hotelsearchpage;_ylc=X3oDMTFtaTIzNXVjBF9TAzk3NDA3NTg5BF9zAzI3MTk0ODEEcG9zAzIEc2VjA21haWx0YWdsaW5lBHNsawNxMS0wNw--
> to find your fit.
------------------------------------------------------------------------
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help