Need some help with ADC readings on 16F72


Closed Thread
Results 1 to 4 of 4

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default Re: Need some help with ADC readings on 16F72

    Change ADCON0=%1100000 to ADCON0=%11000000, and _RC_OSC to _HS_OSC.

    Also, you don't need a word variable for an 8-bit result.
    Last edited by Bruce; - 28th August 2011 at 12:00.
    Regards,

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

  2. #2
    Join Date
    Nov 2009
    Location
    London
    Posts
    251


    Did you find this post helpful? Yes | No

    Default Re: Need some help with ADC readings on 16F72

    Thanks Bruce. Please clear my 1 doubt which I always had but I never asked, but now since I cannot figure out the difference myself, here it goes:

    Q) What it the difference between ADCON0 registers BIT 5-3 & ADCON1 BIT 2-0?

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


    Did you find this post helpful? Yes | No

    Default Re: Need some help with ADC readings on 16F72

    Datasheet is quite self explanatory

    ADCON0 bit 5-3 CHS<2:0> Analog Channel Select Bits
    This will select the Analog Channel (I/O) to read (ADCIN 0, Var , ADCIN 1, Var)

    ADCON1 Bit 2-0 PCFG<2:0> A/D Port Configuration Control Bits
    This configure the I/O... Digital OR Analog
    Steve

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

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