CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

pic16f877 ANx pins

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
bigfish



Joined: 08 Jan 2011
Posts: 18

View user's profile Send private message

pic16f877 ANx pins
PostPosted: Fri Feb 04, 2011 6:59 am     Reply with quote

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: 9229
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Feb 04, 2011 1:22 pm     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group