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

PIC A/D

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







PIC A/D
PostPosted: Sat Feb 20, 2010 4:54 pm     Reply with quote

I want to configure only one A/D channel using PIC16F716 but it is not possible.
The options offered by the compiler are below:
Code:

// Constants used in SETUP_ADC_PORTS() are:
#define NO_ANALOGS            7   // None
#define ALL_ANALOG            0   // A0 A1 A2 A3                     
#define AN0_AN1_AN2_VSS_VREF  1   // A0 A1 A2 VRefh=A3                 
#define AN0_AN1_AN3           4   // A0 A1 A3
#define AN0_AN1_VSS_VREF      5   // A0 A1 VRefh=A3
#define ANALOG_RA3_REF   1     //!old only provided for compatibility
#define RA0_RA1_RA3_ANALOG   4    //!old only provided for compatibility
#define RA0_RA1_ANALOG_RA3_REF 5 //!old only provided for compatibility
 

Could someone help me?

Thank you
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Feb 20, 2010 11:50 pm     Reply with quote

It's not the compiler. It's the PIC. Download the 16F716 data sheet:
http://ww1.microchip.com/downloads/en/DeviceDoc/41206B.pdf
Look in this section:
Quote:

REGISTER 7-2: ADCON1: A/D CONTROL REGISTER 1

Look at the table for the PCFG bits.
Quote:

PCFG<2:0>

It shows 6 possible configurations of A/D pins. That's all you can do.
You can't select individual Analog pins with this PIC.
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