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

setting up adc ports but using some as digital pins

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



Joined: 08 Aug 2012
Posts: 34

View user's profile Send private message

setting up adc ports but using some as digital pins
PostPosted: Wed Aug 08, 2012 1:31 pm     Reply with quote

Hi all:

I had a question regarding setup_adc_ports() functionality for PIC 18F2685.

I need to ONLY have AN0 to AN4, AN10 as analog inputs. However, I see from the header file and from the PIC datasheet (18f2685) that I can only use a few combinations (AN0 to AN3; AN0 to AN4; AN0 to AN10 etc).

So, seems like the only option I have is to:
a) Configure all pins (AN0 to AN10) as analog input.
b) Re-configure AN8, AN9 as digital pins and use them and/or re-configure the pins back to analog once the firmware is done using them as digital pins.

Does anyone know of any issues doing this?

Regards
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Aug 08, 2012 1:48 pm     Reply with quote

Read these posts by Ttelmah on the topic:
http://www.ccsinfo.com/forum/viewtopic.php?t=38205
http://www.ccsinfo.com/forum/viewtopic.php?t=44392
http://www.ccsinfo.com/forum/viewtopic.php?t=44090&start=5
http://www.ccsinfo.com/forum/viewtopic.php?t=42954
wirelessage



Joined: 08 Aug 2012
Posts: 34

View user's profile Send private message

PostPosted: Wed Aug 08, 2012 2:15 pm     Reply with quote

Thanks for the prompt response! These older forum references contain good info.

Regards
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