Help in Understanding the Math


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322

    Default Help in Understanding the Math

    It has been a long time since I have done any programming and somehow I have completely forgotten the logic / rules for doing simple math functions. I have a drawer full of LTC1298 A to D converters which produce a 12 bit number. At say 5 vdc on the input to the 1298 you will get 4096 as the digital representation. 4096 divided by 5.0 volts would say you have .0012207 volts per bit. Okay so now you have 12207 times the reading from the LTC1298. At 2.5 volts this would be half of the 4098 or 2048. 2048 time 12207 would give 24,999,936 which is far in excess of the 65,535 limit of the PIC. So, what is the logic in doing the math?

    Thanks, Ed

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: Help in Understanding the Math

    V/5 = adc/4096

    v = (adc/4096) * 5

    adc = (v * 4096) / 5
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: Help in Understanding the Math

    Thank you Steve!
    Now I feel like the guy in your avatar!

    Best, Ed

Members who have read this thread : 1

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