Stable ADC readings


Closed Thread
Results 1 to 40 of 91

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    ADCIN doesn't work with port pin aliases. Use ADCIN 2,W0, or define PinProbe as a constant. PinProbe CON 2 would work.

    Also ADCIN doesn't setup TRIS, ANSEL or ADCON1. So you end up with Fosc/2 for your A/D clock because ADCON1 defaults to all 0's. So you're way out of spec for a 4MHz osc. Fosc/8 would be a good one to use with 4MHz (see datasheet).
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default

    Bruce ... 1K points ...

    as always !!!...

    Shame on me.

    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 " !!!
    *****************************************

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Blonde moment here too

    Disclaimer: "Blonde moment" is a deliberate sentence that belongs to Mister_e user and plah plah plah, shall not be considered as offensive plah plah plah. Complaints about that shall not be send to Admin, Mods, user but only to Mister_e user plah plah plah....
    Last edited by mister_e; - 23rd January 2011 at 21:37. Reason: Disclaimer
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default

    Hi, Steve

    I Think the "Blonde" term use rights already belong to KarenHornby ...

    so, you'll have to buy a licence ...

    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 " !!!
    *****************************************

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    busted .....
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default Re: Stable ADC readings

    So to summarize 'in speak' that won't scare folks who thought if/then statements were an uinsurmountable hurdle.....are we saying that using the ADCIN is not optimum...and if not could someone please post a chunk of code to do this in an alternative method?

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


    Did you find this post helpful? Yes | No

    Default Re: Stable ADC readings

    Dave
    Always wear safety glasses while programming.

Members who have read this thread : 1

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