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=16 or ADC=10

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



Joined: 08 Oct 2005
Posts: 13

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

ADC=16 or ADC=10
PostPosted: Tue Sep 12, 2006 12:25 pm     Reply with quote

I am using a 18f458, that has a 10 bit adc
The questions is :
What i have to use ....ADC=16 ????
or adc=10?
I dont understand why the compiler allow me to put a 16 bit adc if i have only 10 bit in the hardware....
Thanks!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Sep 12, 2006 12:44 pm     Reply with quote

If you have a 10-bit ADC and you use ADC=16, the result will be
left-justified, as shown in the chart in the read_adc() section of the
manual. Link to CCS manual:
http://www.ccsinfo.com/downloads/ccs_c_manual.pdf
The chart is also shown in this post:
http://www.ccsinfo.com/forum/viewtopic.php?t=26002
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