ADC in pic16f877a

Thread Starter

thrza

Joined Apr 6, 2009
3
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....!!!
 

SgtWookie

Joined Jul 17, 2007
22,230
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.
 

tuanvoi

Joined Oct 31, 2008
56
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
 

mik3

Joined Feb 4, 2008
4,843
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....!!!
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?
 
Top