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

ADC channel selector for the 16F913

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



Joined: 08 Sep 2003
Posts: 92
Location: Glasgow, UK

View user's profile Send private message

ADC channel selector for the 16F913
PostPosted: Wed Jun 15, 2005 9:00 am     Reply with quote

I am about to embark on a new project using the 16F913. Before I upgrade my PCM compiler to get the 16F913 capability, can someone please double check for me the ADC channel selector setup.

If I read the data sheet correctly, it looks as if I should be able to set the ADC channels individually using the ANSEL register. This is what i need clarifying - as I only intend to use 3 of the channels for the ADC, the remainder of the port needs to be Digital I/O.

How reliable are the CCS header files for this device as they tend to get them wrong with new chips?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Jun 15, 2005 9:37 am     Reply with quote

These are the constants from 16F913.H for vs. 3.225.
Code:
// Constants used in SETUP_ADC_PORTS() are:
#define sAN0            1       //| A0
#define sAN1            2       //| A1
#define sAN2            4       //| A2
#define sAN3            8       //| A3
#define sAN4            16      //| A5
#define NO_ANALOGS      0       // None
#define ALL_ANALOG      31      // A0 A1 A2 A3 A5
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