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

12F675 two ports ADC

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







12F675 two ports ADC
PostPosted: Sat Dec 05, 2009 12:21 am     Reply with quote

I want to use two ports of PIC12F675 ADC. I know how to use a single channel. But in 12F675.h file its written:
Code:

// Constants used in SETUP_ADC_PORTS() are:
#define sAN0                   1         //| GP0
#define sAN1                   2         //| GP1
#define sAN2                   4         //| GP2
#define sAN3                   8         //| GP4
#define NO_ANALOGS             0         // None

How to set two ports for ADC ????
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Dec 05, 2009 12:43 am     Reply with quote

The sANx constants are OR'ed together. For an example, look at the
setup_adc_ports() line in this post:
http://www.ccsinfo.com/forum/viewtopic.php?t=38836&start=4&highlight=setup_adc_ports
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