bigfish
Joined: 08 Jan 2011 Posts: 18
|
pic16f877 ANx pins |
Posted: Fri Feb 04, 2011 6:59 am |
|
|
Hi all,
I'm using pic16f877A. Currently I'm using pins B1,B2,B3,B4,D4,D5,D6,D7. I need 4 more pins for digital output. Which pins to use for this purpose? Can I use AN4-7? If yes, how?
Thanks in advance |
|
temtronic
Joined: 01 Jul 2010 Posts: 9221 Location: Greensville,Ontario
|
|
Posted: Fri Feb 04, 2011 1:22 pm |
|
|
According to the header file...
#define AN0_AN1_AN3 4 // A0 A1 A3
would allow you to use AN4 as a digital pin as well as AN5,6,7.
You'll also have to deselect the parallel port configuration.
All this is detailed in the header file. |
|