Inner workings of adc


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    Hi Alain!

    without checking the datasheets or functioning code snippets
    my idea was the following:

    only 1 channel for cap touch (example on a 12F)
    ---------------------------------------

    1...Tris to output and pin high/Vdd

    2...charge Chold / Point ADC to the High pin (for example ANS<3:0>: Analog Select bits = 0001)

    3...disconnect Chold ANS<3:0>: Analog Select bits = 0000

    4...digital output low... dicharge external capacitance

    5...Tris to input

    6...Analog Select bit 0001 / (Point ADC to sensor on the same pin)

    7...Begin Conversion.../...Set GODONE

    ----------------------------------------------------------------------



    I guess I have 2 more uncertainties

    in the following procedure:
    1 tris to input
    2 pointing ADC to input channel (using Analog select bits)
    3 wait for Chold to charge to input pin level
    4 disconnecting Chold from input channel (ANS = 0000)
    5 Start Conversion....


    1))) Can it work? Is only the charge on Chold needed for the conversion?

    2))) Is there only 1 Chold for all analog channels, or one Chold on every analog channel?



    These are just some thoughts..... I will get around to testing myself next month....

    If someone can point me to a datasheet or appnote that sheds some light on this, I would be greatfull...

    regards,
    mike

  2. #2


    Did you find this post helpful? Yes | No

    Default

    Sorry... please ignore 2)))

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Never posted my thoughts....
    the method woudn't work because the Ansel bits (which select the channel the sampling cap is connected to) don't allow for the sampling cap to be disconnected from all the channels... too bad...

    As much as I looked around I couldn't find a single good resource on how the Adc internals really work... as far as I can guess the Sampling cap comes after the multiplexer or is built into it...

    If I ever get the chance to make some pcbs I will be testing a few other ideas I had... will post my results then...

  4. #4
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    The online book from Mikroe explains it with some nice visuals.

    http://www.mikroe.com/en/books//picmcubook/ch7/

    Attached Images Attached Images  

  5. #5


    Did you find this post helpful? Yes | No

    Default

    Hi, thanks for the reply. I believe I stumbled upon that image when I started the thread. Together with these 2 attached images (from microchip datasheet), I had tried to figure out where exactly the Sampling cap is located (in the multiplexer?, between multiplexer and adc unit? in the adcunit?)

    Currently I believe it may be in the adc, with godone disconnecting it from the multiplexer and connecting it to the successive approximation circuitry (new channel can be selected after godone is set, but sampling of new channel begins only when conversion is complete) .

    I also had a few other questions even though they may have no practical application:

    For example can the sampling cap be connected to a pin (using Ansel) while ADON is off? Does the Sampling Cap retain its charge when ADON is off?


    I guess that led to a useful question as well and I haven't found an answer yet:

    Can internal resistance and capacitance of a pic pin be measured using a voltmeter/LC-meter without destroying the pic?
    Attached Images Attached Images   

  6. #6


    Did you find this post helpful? Yes | No

    Default

    Any information regarding the last question would be great to know in advance

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