16F88 ADC Problems


Closed Thread
Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    May 2011
    Posts
    16


    Did you find this post helpful? Yes | No

    Default Re: 16F88 ADC Problems

    Thanks Steve, but how does the ADC know which port to read in? For example, we could read in PortA.1 or PortB.1

    cheers

    Mark.

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


    Did you find this post helpful? Yes | No

    Default Re: 16F88 ADC Problems

    It's all about it's associated Channel number.

    PortB.0.= AN0 = Channel 0 = ADCIN 0, bVar
    PortB.7 = AN6 = Channel 6 = ADCIN 6, bVar

    PBP manual:

    ADCIN

    ADCIN Channel,Var

    Read the on-chip analog to digital converter Channel and store the result in Var. While the ADC registers can be accessed directly, ADCIN makes the process a little easier
    Manual Really said Channel... not pin name.

    Further details, open the datasheet, and see how you manually implement it... you also select/assign a channel number to the PIC register, not a pin name.


    hth
    Last edited by mister_e; - 15th June 2011 at 02:15.
    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