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 support@ccsinfo.com

Config A/D Ports

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



Joined: 08 Oct 2003
Posts: 11
Location: BRAZIL

View user's profile Send private message

Config A/D Ports
PostPosted: Wed Sep 08, 2004 7:45 am     Reply with quote

Hi..
Actually i'm using PIC16C774...
I need.. RA0, RA1 and RA2 be analogs and others digital.
How to do config the ports...

Thanks for your help.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Wed Sep 08, 2004 8:00 am     Reply with quote

Did you read the datasheet or even look at the device header file?
Code:

SETUP_ADC_PORTS(AN0_TO_AN2);
pitufos



Joined: 08 Oct 2003
Posts: 11
Location: BRAZIL

View user's profile Send private message

PostPosted: Wed Sep 08, 2004 8:11 am     Reply with quote

Hi Mark.. thanks for your help...
SETUP_ADC_PORTS(AN0_TO_AN2); ??? are you sure ?
In my compiler(version 3.179) indicate error...

bye..
Leandro
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Wed Sep 08, 2004 8:13 am     Reply with quote

Your compiler might be too old, try this instead:

Code:

SETUP_ADC_PORTS(AN0_TO_AN2_ANALOG);
pitufos



Joined: 08 Oct 2003
Posts: 11
Location: BRAZIL

View user's profile Send private message

PostPosted: Wed Sep 08, 2004 8:15 am     Reply with quote

I resolve using this code:
SETUP_ADC_PORTS(AN0_TO_AN2_ANALOG);
Same to last message.

Thanks...
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