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 theory

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







ADC theory
PostPosted: Thu Mar 09, 2006 2:04 am     Reply with quote

Sorry my bad english!
My project make use of PIC 16F877A.
Whish AD-convert result is "better" 4MHz or 20MHz xtal?
Or affect speed AD-convert results?
Ttelmah
Guest







PostPosted: Thu Mar 09, 2006 3:39 am     Reply with quote

You have to define the ADC clock yourself. It is divided _from_ the master clock (or runs from an internal RC clock). The latter tends to perform less well than dividing it from the master clock, especially at higher clock rates (you get asynchronous 'noise' from the master clock - hence it is not recommended for use above 1MHz, except if you put the chip to sleep for the conversion - this is the 'quietest' mode of all). You select the ADC clock, with the 'setup_adc' command.
For the 20MHz clock, setup_adc(ADC_CLOCK_DIV_32), will give an ADC clock at 1.6uSec/bit (625KHz). For 4MHz, setup_adc(ADC_CLOCK_DIV_8), will give an ADC clock at 2uSec/bit (500KHz). Both are inside the required rate, and results should be basically indistinguishable, provided the source meets the specifications on impedance etc..

Best Wishes
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