Stable Adc Reading Routine


Closed Thread
Results 1 to 28 of 28

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Sweden
    Posts
    237


    Did you find this post helpful? Yes | No

    Wink

    I'd say that it is 2^16(65536) that is the right value to use but that's not really important since the error we're talking about is 0,0015%. Your resistors and ADreference will produce a far greater error than that.

    Happy coding
    /Ingvar

  2. #2
    Join Date
    Oct 2005
    Posts
    18


    Did you find this post helpful? Yes | No

    Default

    Ingvar I did test what you suggested and it was RIGHT.
    In other words it does exactly the same as FP routines do and at lesser code space cost.
    Ofcourse it doesnt solve my problem but it can be used to save space effectively.
    I believe that using a converter with greater than 10 bits resolution is a must and if there is a chip suggestion, to make things easy, I am waiting for it.
    Thanks again
    Bill

  3. #3
    Join Date
    Apr 2006
    Location
    New Hampshire USA
    Posts
    298


    Did you find this post helpful? Yes | No

    Post 18F8723 - 12 bit A/D ???

    Quote Originally Posted by gebillpap View Post
    Ingvar I did test what you suggested and it was RIGHT.
    In other words it does exactly the same as FP routines do and at lesser code space cost.
    Of course it doesnt solve my problem but it can be used to save space effectively.
    I believe that using a converter with greater than 10 bits resolution is a must and if there is a chip suggestion, to make things easy, I am waiting for it.
    Thanks again
    Bill
    18F8723 - 12 bit A/D ???
    http://www.picbasic.co.uk/forum/showthread.php?t=7330
    Ohm it's not just a good idea... it's the LAW !

  4. #4
    Join Date
    Jul 2003
    Location
    Sweden
    Posts
    237


    Did you find this post helpful? Yes | No

    Lightbulb

    If you choose a Pic that has the capability to use external Vref you can get about twice the resolution(above 15V). Put a 50/50 voltagedivider(2.5V) on Vref-, feed it with Vdd. Connect Vref+ to Vdd. The AD will now give you a zero reading for everything below 15V. 30V will still produce maxreading. Your calculation would look like .......

    ScaledResult = (AccumulatedADvals ** 15000) + 15000

    Unfortunatley the 12F675 doesn't have this capability.

Similar Threads

  1. Reading A Photo Resistor using ADC
    By jessey in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 25th January 2007, 09:28
  2. adc reading ac
    By Ruben Pena in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 20th December 2005, 21:57
  3. 12F675 ADC 'Issues'
    By harrisondp in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 31st March 2005, 01:55
  4. Problem reading multiple ADC ports
    By jswayze in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 4th November 2004, 16:46
  5. Reading multiple ADC channels FAST
    By lwindridge in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 21st April 2004, 22:37

Members who have read this thread : 4

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