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

Help With 12f683 Two Analog Inputs
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
arachid



Joined: 15 Oct 2016
Posts: 11

View user's profile Send private message

PostPosted: Tue Feb 19, 2019 6:43 pm     Reply with quote

according to datasheet page 62 note 4:
4: When the device frequency is greater than 1 MHz, the FRC clock source is only recommended if the
conversion will be performed during Sleep.

them yo have two choice not use the internal FRC :

Code:

setup_adc(ADC_CLOCK_DIV_8);
//this case adc will need 2us to make convesion
or
setup_adc(ADC_CLOCK_DIV_16);
//this case adc will need 4us to make convesion

arachid



Joined: 15 Oct 2016
Posts: 11

View user's profile Send private message

PostPosted: Tue Feb 19, 2019 6:55 pm     Reply with quote

according to datasheet page 62 note 4:
4: When the device frequency is greater than 1 MHz, the FRC clock source is only recommended if the
conversion will be performed during Sleep.

them yo have two choice not use the internal FRC :

Code:

setup_adc(ADC_CLOCK_DIV_8);
//this case adc will need 2us to make convesion
or
setup_adc(ADC_CLOCK_DIV_16);
//this case adc will need 4us to make convesion

Rez



Joined: 10 Feb 2019
Posts: 26

View user's profile Send private message

PostPosted: Tue Feb 19, 2019 7:02 pm     Reply with quote

Everything is working now and I changed the ADC clock as well, Thanks everyone.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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