DEFINE ADC_CLOCK for 16F PICs


Closed Thread
Results 1 to 17 of 17

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Thanks, Darrel--I had already noted those two statement changes, but I appreciate the reminder.

    I'm looking at 2 pots and the output of 5 op amps, but it isn't a problem if the values wander a little. (Probably I don't need 10 bits, either . . . !)

    Thanks for the link, too. I'll take a longer look when I next treat myself to a break.
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

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


    Did you find this post helpful? Yes | No

    Default

    Part of what confused me on this matter is the statment in my PBP manual under "ADCIN":

    <b>ADC_SAMPLEUS is the number of microseconds the program waits between setting the <i>Channel</i> and starting the analog to digital conversion. This is the sampling time.</b>

    Comments, anyone?
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

  3. #3
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    The A/D converters have a FET switch on each input. When you change the channel, the gates on those FETs toggle. There is a finite capacitance between the gate and the drain and source of the FET, so the toggling of the gate signal causes what is called charge injection into the other pins. This causes a glitch at the input and output of the FET switch. If you read the A/D too quickly after you change the channel, you will get an inaccurate reading due to voltage spike caused by the charge injection. The time it takes for this excess charge to bleed away is dependent on your source impedance. If your source is the output of an op-amp (zero ohm source), then you can switch channels and start conversion within 3uSec. If your source is 10K then you should wait at least 11uSec after changing channels before you start a conversion. If you don't wait long enough, your accuracy will suffer.
    Charles Linquist

Similar Threads

  1. RF Modules
    By tonyfelloni in forum mel PIC BASIC Pro
    Replies: 44
    Last Post: - 26th June 2010, 17:42
  2. PIC16F877A analog problem
    By DeViLa_Q8 in forum mel PIC BASIC
    Replies: 0
    Last Post: - 30th July 2009, 20:19
  3. RX TX modules - intermitent communication
    By ruijc in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 11th June 2009, 00:13
  4. PIC HSERIN problem
    By shaiqbashir in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 20th July 2008, 11:08
  5. Replies: 8
    Last Post: - 17th September 2006, 17:46

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