is the 16F690 AD crappy ? missing steps on 10bit AD


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2003
    Posts
    98

    Default is the 16F690 AD crappy ? missing steps on 10bit AD

    Been banging my head against this one, using the PIC16F690 AD converter i have been getting a lot of missing steps and it sure seems like it is the part

    first the obvious was checked, the input voltage is very clean and stable as is VDD, the source impedance is <10K, results are the same with and without a cap at the input, VREF=VDD
    have tried another board with another chip, identical behavior

    here is what i am doing:
    using ADCIN (got same results doing it 'manually'), 10 bit, right justify

    i vary the voltage slowly while monitoring on a scope, DMM and character LCD which is showing the AD values as i vary the voltage

    for a smooth slowly rising input i get sequences like this in decimal:
    682 683 685 687 691 695 696
    it doesn't matter where in the range or whether ascending or descending i am getting missing counts of 2 - 5 steps

    during the missed steps like from 687 - 691 i confirmed that the input voltage was changing normally

    i have used PIC AD converters many times without seeing this so my conclusion is that this part is crummy, or is there something else to try ?

    anyone have this missing codes experience on this chip or others ?
    thanks
    ds

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


    Did you find this post helpful? Yes | No

    Default

    You code try posting your code...
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Nov 2003
    Posts
    98


    Did you find this post helpful? Yes | No

    Default

    i found the problem
    i had to set bits 6:4 in ADCON1 to match the setting in the
    Define ADC_CLOCK
    after that it is working well now

    so what about ANSEL ?
    does ADCIN handle that automatically ?
    it seems to work the same whether or not i explicitly set the ANSEL bits

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by dsicon View Post
    so what about ANSEL ?
    does ADCIN handle that automatically ?
    it seems to work the same whether or not i explicitly set the ANSEL bits
    You can read Analog no matter which state ANSEL is in.
    It's Digital that has a problem, and always reads 0 when ANSEL bits = 1.

    Frankly, I think they should have called the register ... DIGSEL.

    P.S.
    But, when Digital is enabled on an analog pin, it adds an extra load, can throw off the analog impedance, and adds switching currents when the analog signal is near the input switching levels.
    Especially prevalent on TTL inputs.
    Last edited by Darrel Taylor; - 19th June 2010 at 02:35. Reason: P.S.
    DT

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts