How long to sample?


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2006
    Location
    Omaha, Nebraska USA
    Posts
    263

    Question How long to sample?

    I need to look at the voltage on an ADC port for time t and detect the greatest value that occurs during that time.

    My difficulty is that I don't know how long the ADCIN command takes, so I don't know where to start in terms of how many times to look at the pin and at what intervals.

    I'm using PBP with a 12F683 at 8 MHz.
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Well, as to how long the conversion takes ... I posted a table recently that may answer that question ...

    http://www.picbasic.co.uk/forum/show...62&postcount=4

    But there's also the acquisition time, which depends on the impedance, so it's not a complete answer.

    If you know what the impedance is, that can be calculated too.
    DT

  3. #3
    Join Date
    Aug 2006
    Location
    Omaha, Nebraska USA
    Posts
    263


    Did you find this post helpful? Yes | No

    Default

    The table helped a lot--thanks!

    Impedance of the source is about 20K.
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    20K

    Well, that is over the recommended maximum.
    But I've found it doesn't matter much ...

    According to mister-e's PicMultiCalc, an impedance of 20K would need 19µS acquistion time.

    Just a hunch, but I'm thinking more like 30µS.
    Testing will tell.
    <br>
    DT

Similar Threads

  1. High Resolution Timer & Speed Calculator
    By WOZZY-2010 in forum Code Examples
    Replies: 4
    Last Post: - 7th February 2010, 16:45
  2. Hello, long time no post (ADC sample rate)
    By Jhong2 in forum General
    Replies: 0
    Last Post: - 14th April 2009, 04:13
  3. Serial communication fails after long pause
    By brid0030 in forum General
    Replies: 4
    Last Post: - 13th February 2008, 18:56
  4. Timer and long (hours) sleep period - how to?
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 8th January 2007, 07:32
  5. Long varible strings
    By flashg in forum Serial
    Replies: 0
    Last Post: - 14th October 2006, 04:40

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