ADC in pic16f877a

Discussion in 'Embedded Systems and Microcontrollers' started by thrza, Apr 9, 2009.

  1. thrza

    Thread Starter New Member

    Apr 6, 2009
    3
    0
    I want to know that which PIN on the pic16f877a is the ADC pin?
    I know its a simple question but am very much new to this micro-controller. But am coming through some projects in which people connect the LM35 to the A PORT and some connect it to the C PORT.

    SO PLEASE HELP. AM CONFUSED....!!!
     
  2. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    This should've been asked in the proper forum (Embedded Systems and Microcontrollers), but I digress.

    The ADC for the PIC16F877A is available on at least 8 different channels.

    You need to decide first what is necessary for your project. Selecting the ADC channel is part of those decision criteria. Right now, you haven't given us much of an idea about your project; only that you are confused.

    General suggestion: Save the "wide" ports for items that require lots of I/O pins, like interfaces such as keyboards and LCD's. Use the "narrow" ports for devices that require few I/O pins.
     
  3. tuanvoi

    Active Member

    Oct 31, 2008
    56
    0
    Hello,
    It depends on the channel you select. Read page 253 of datasheet of your PIC. For example, if 0101 = Channel 5, this means AN5 which is PORTE pin0. But keep in mind that, you have to set up proper FOSC, and voltage reference, turn on ADC...
    Guys please correct me if I'm wrong.
    Tom
     
  4. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    There are 8 ADC channels on this particular PIC and you can choose one (or more) out of them.

    Which programming language and compiler are you using?
     
Loading...