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

How to set pins for external vrefh and vrefl?

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



Joined: 13 Nov 2012
Posts: 219
Location: France

View user's profile Send private message

How to set pins for external vrefh and vrefl?
PostPosted: Wed May 27, 2015 12:30 am     Reply with quote

Hi all,

chip 18F26K80
compiler 5.045

I have analog inputs on AN0 - AN3.

I can't figure out how to select AN8 as VREFhigh and AN10 as VREFlow.

In the 18f26k80.h file it mentions

set_analog_pins(int32 pins, int32 reference);

but I can't find any document or help entry describing what it does.
Ttelmah



Joined: 11 Mar 2010
Posts: 19477

View user's profile Send private message

PostPosted: Wed May 27, 2015 1:04 am     Reply with quote

You can't.

This is all down to reading the data sheet. Vref+, is pin RA3, Vref- is pin RA2. Fixed. Can't be changed.

You need to move your input signals to a couple of other pins.

Generally 'reference' analog signals can't be moved. Unlike digital signals, where a simple multi-line decoder can be used to move them around, analog signals require a complete multiplexer, and this has a significant impedance. Not too important on the analog inputs, but disastrous on things like reference voltages....
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