Searching \ for '[PIC]: Assigning analogue inputs' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/microchip/ios.htm?key=analog
Search entire site for: 'Assigning analogue inputs'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Assigning analogue inputs'
2003\04\22@065735 by Edward Cooper

picon face
Hi

I'm not sure I quite understand how ADCON1 works on the 16F877, Im
looking to have two or three analogue inputs and still maintain the
rest of the pins as digital I/O's, it would seem most convenient to use
the three pins on PortE as the A/D's but I think to use them I will use
the conventional digital I/O on PortA?

Thanks for any help

Ed

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2003\04\22@072226 by erholm (QAC)

flavicon
face
Correct, as the table on page 126 in DS39582A says.
You can not use *only* PortE for A/D.
Jan-Erik Soderholm.

Edward Cooper wrote:
>Hi
>I'm not sure I quite understand how ADCON1 works on the 16F877, Im
>looking to have two or three analogue inputs and still maintain the
>rest of the pins as digital I/O's, it would seem most convenient to use
>the three pins on PortE as the A/D's but I think to use them I will use
>the conventional digital I/O on PortA?

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2003\04\22@074757 by Jinx

face picon face
> I'm not sure I quite understand how ADCON1 works on the 16F877,
> Im looking to have two or three analogue inputs and still maintain
> the rest of the pins as digital I/O's

Your best bet would be to set PCFG3:PCFG0 to 0100. That gives you
3 x A (RA0, RA1, RA3) and 5 x D

0010 sets PortE to D and PortA to A if you'd wanted 3 x D and 5 x A ;-(

Table 11-2, DS30292B (F877 Manual) or Section 21, Mid-Range Manual

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2003\04\22@075421 by Edward Cooper

picon face
Thanks

So is my best bet to go for PCFG3:0 = 0100 and have AN 0,1,3 as
analogue inputs and the rest of A and E as digital I/O as normal?

Am I interpreting this correctly?

Ed

On Tuesday, April 22, 2003, at 12:09  pm, Jan-erik Soderholm (QAC)
wrote:

{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2003\04\22@083813 by Olin Lathrop

face picon face
> I'm not sure I quite understand how ADCON1 works on the 16F877, Im
> looking to have two or three analogue inputs and still maintain the
> rest of the pins as digital I/O's, it would seem most convenient to use
> the three pins on PortE as the A/D's but I think to use them I will use
> the conventional digital I/O on PortA?

It's not clear what exactly your question is.  However, if you want just
three analog inputs and don't need external Vref, these inputs will be
AN0, AN1, and AN3.  The table on page 112 (DS30292C) shows all available
combinations of analog and digital inputs.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

More... (looser matching)
- Last day of these posts
- In 2003 , 2004 only
- Today
- New search...