Finding the change and direction of a signed word value (sensor output) ?


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Lightbulb Supposing you build a barometer or altimeter ... using MS5534 or Hope HP03 ...

    Hi, Martin

    Assuming pressure will be read as i.e 1013.3 mb ( displayed number < 65536) ...

    the difference between two measures will be < 32768 ... ( or you will feel really really really bad !!! )

    sooo ...

    the MSB of the difference will be 0 for positive difference and 1 for neg difference... add to that PBP offers the direct print of the value and sign : " SDEC Difference "

    Alain
    Last edited by Acetronics2; - 17th May 2010 at 13:29.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  2. #2
    Join Date
    Nov 2008
    Posts
    96


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    Hi,

    Assuming pressure will be read as i.e 1013.3 mb ( displayed number < 65536) ...

    the difference between two measures will be < 32768 ... ( or you will feel really really really bad !!! )

    sooo ...

    the MSB of the difference will be 0 for positive difference and 1 for neg difference... add to that PBP offers the direct print of the value and sign : " SDEC Difference "

    Alain
    The sensor is a Bosch BMP085. The actual raw un-compensated pressure value at about 260m (where I live) is -24200 in SDEC. I'm not sure what the range of values is going to be yet, I need to work that out yet (from sea level to say 1000m).

    I'll try out the SDEC Difference to see what it does too.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts