Analog Digital Conversion ??


Closed Thread
Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    704


    Did you find this post helpful? Yes | No

    Default Re: Analog Digital Conversion ??

    Hi,

    Welcome to the forum. The operators "*/" and "//" can be found in the 'Math Operators' section of the PBP manual.

    http://melabs.com/resources/pbpmanual/

    Now, about your other questions, many of us don't have the good habit of writing a good comment after every line of code. So, I am not sure what the programmer wanted to do there. Maybe somebody else here has a better answer.

    Robert
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Analog Digital Conversion ??

    If we knew what this code was written for we might be able to answer your other questions, but random code ...
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default Re: Analog Digital Conversion ??

    1 is clearly an offset. The reason for using it is unknown, it could depend on the necessity to alline the reading with other device

    1250 is a coefficient for converting the ADC reading into volts. The actual coefficient should be 12.5 but due to the integer math limitation the author did multiply it by 100 to obtain 1250 and then he devide the product by 100.

    All these numbers are related to a specific application, so you should ignore them, since very likely, your application will require different numbers as coefficient and eventually an offset.

    Cheers

    Al.
    All progress began with an idea

Similar Threads

  1. analog and digital
    By lerameur in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 10th June 2008, 02:40
  2. digital to analog conversor
    By sirvo in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 22nd January 2008, 20:46
  3. PortA analog and digital IO
    By krohtech in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 30th November 2007, 02:25
  4. Digital to Analog Converter
    By kutsi in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 27th June 2007, 19:17
  5. Replies: 2
    Last Post: - 14th April 2006, 09:42

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