Inner workings of adc


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1

    Lightbulb Inner workings of adc

    Hi! I've been cathing up on theory, and have questions regarding the inner/electrical workings of the ADC module and Chold (Sample and Hold Capacitor).

    reading through various documents (for example ww1.microchip.com/downloads/en/AppNotes/01298A.pdf)
    I'm left with some uncertainties.

    It is currently my understanding that simply pointing to the correct ADC Channel (via ANSEL Analog Select bits) will connect and charge/discharge CHOLD to the level at that pin. In the beforementioned reference that pin is
    a driven digital output so Chold is charged to Vdd....

    I'm guessing the Analog Select Bits directly control the Sampling Switch Rss. So its also possible to sample....and then disconnect CHOLD via ANSEL and still start a conversion via the godone bit?
    I also assume disconnecting CHOLD only works as long as the go/done bit hasen't been set yet..

    "Sampling and Conversion: After a new channel
    is selected, a minimum amount of sampling time
    must be allowed before the GO/DONE bit in
    ADCON0 is set to begin conversion. Once
    conversion begins, it is OK to select the next
    channel, but sampling does not begin until current conversion is complete!
    ....."

    I'd be greatful for any pointers...
    (unfortuntely I don't have my electronics nearby to gain insight... would have been a quick test of a Vref...)

    greets mike

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


    Did you find this post helpful? Yes | No

    Default

    This thread might help clear things up. Then again it might not.
    http://www.picbasic.co.uk/forum/showthread.php?t=11947
    let us know.
    Dave
    Always wear safety glasses while programming.

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Thanks you for replying. I'm not having problems on the software side... I've used the ADC module quite often without really grasping some of the inner workings...(for that I simply select the channel, wait the sampling time, set go/done)


    I guess the questions I have is:

    Can the CHold capacitor be charged (by selecting the appropriate channel and waiting the sample time), then be disconnected by deselecting the channel, and still be converted by immediately setting the GoDone bit after disconnection?
    regards,
    mike

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


    Did you find this post helpful? Yes | No

    Default

    Not sure what you are wanting???
    Selecting the channel just tells what channel the go/done bit converts if the ADC is enabled.
    Dave
    Always wear safety glasses while programming.

  5. #5


    Did you find this post helpful? Yes | No

    Default

    Sorry, I've been quite busy and never got back to this... I had wondered why, in the above mentioned appnote (ww1.microchip.com/downloads/en/AppNotes/01298A.pdf), 2 channels are needed (and if it's possible to get by with just 1)... I plan to do some testing one of these days, but I'm busy with other projects at the moment... anyway, that's where I was going with my post...

    regards
    Michael
    Last edited by Michael Wakileh; - 11th December 2009 at 22:17.

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Lightbulb

    Hi, Michael

    2 Channel required , why ???

    SIMPLY because it is needed to charge CHold to Vcc ... through one channel. ( How else ? )

    AND the second channel is used for measure...

    sooo ...

    2 "buttons" need 3 channels , 3 buttons ... 4 channels, etc, etc ...

    Capisce ???

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Similar Threads

  1. Stable Adc Reading Routine
    By gebillpap in forum General
    Replies: 27
    Last Post: - 13th May 2015, 02:18
  2. Can't get ADC to loop
    By TravisM in forum mel PIC BASIC
    Replies: 2
    Last Post: - 11th October 2009, 15:33
  3. PIC18F2423, ADC problem
    By mistergh in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 17th March 2009, 01:31
  4. ADC value with 2 decimals on an LCD
    By Squibcakes in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd December 2005, 15:54
  5. 12F675 ADC 'Issues'
    By harrisondp in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 31st March 2005, 01:55

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