How is this data being formed from the values given?


Closed Thread
Results 1 to 10 of 10

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default Re: How is this data being formed from the values given?

    Hi, Peter

    I suggest you to try :

    count = ( 1001 x Voltage - 9891 ) / 8

    Alain
    ************************************************** ***********************
    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


    Did you find this post helpful? Yes | No

    Default Re: How is this data being formed from the values given?

    Thanks again for the ideas. Alain what makes yours special/sneaky?

    I note that in my original table the 3rd character of the hex words 100V = $2C30 (3) in this case is never a letter A,B,C,D,E,F
    Either I got lucky with my samples or something else is happening.

    I was wondering if we are seeing the output from a 12bit ADC 4096 packed into those twelve bits.

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: How is this data being formed from the values given?

    Sorry I'm still a bit stuck.

    Looking at this again lets assume my voltage data is being encoded into a 3 digit hex humber. (12 bits)? or is it a raw 10 bit non justified ADC result I am seeing?

    Lets take 100V as an example $2C3 = 707

    The position 3 is never > 7 and varies between 0 and 7 as the voltage rises and falls.

    That feels significant, so what is going on?

    150V for example = $447 = 1095

    Grateful for any other ideas.

    Or alternatively how can I prevent anything other than 0-7 appearing in the result?

  4. #4
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    967


    Did you find this post helpful? Yes | No

    Default Re: How is this data being formed from the values given?

    Hi Peter

    Let us walk through this as per what I suggested

    (100V-10)*126 = 11340 = $2C4C
    (150V-10)*126 = 17640 = $44E8

    Now suppose we drop the last nibble( divide by 16), you get $24C and $44E which is pretty close to the numbers you're seeing. So, the error must be in the formula being an approximation.

    Hope this makes it easier for you to solve the issue

    Regards

  5. #5


    Did you find this post helpful? Yes | No

    Default Re: How is this data being formed from the values given?

    Thanks I think I have it now..

Similar Threads

  1. need eeprom to save values
    By queenidog in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 10th July 2014, 00:16
  2. linear data memory & large data arrays
    By ronsimpson in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 27th June 2011, 23:21
  3. Port Values
    By Pesticida in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 2nd January 2007, 20:44
  4. t in POT, c's values
    By selbstdual in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 24th August 2006, 23:30
  5. Numeric Values
    By Armando Herjim in forum General
    Replies: 8
    Last Post: - 28th June 2006, 01:54

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