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

adc unstable

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



Joined: 21 Mar 2010
Posts: 37

View user's profile Send private message Yahoo Messenger

adc unstable
PostPosted: Fri May 21, 2010 6:21 am     Reply with quote

what are the usual cause of unstable adc? how to correct it?
Gabriel



Joined: 03 Aug 2009
Posts: 1067
Location: Panama

View user's profile Send private message

PostPosted: Fri May 21, 2010 6:42 am     Reply with quote

your supply is unstable....

you have noisy signals close to your input...

you can try using a digital low pass filter like so:

(i do not take credit for this algorithm, another user posted it on an older thread)
Code:
filtered_value = (new_value + old_value+ old_value+ old_value)/4


or "olympic filter"---- search for "olympic" and youll get answers.

(i do not take credit for that algorithm ethier)

search for "filter" on the forum youll see several threads dealing with this.

you can put a small cap on your input... but that will limit your bandwith depending on the frequency of your input...and the size of the cap...


stabilize your supply....
keep your signal away from noise...
try using a digital filter...
try using a good voltage reference....
place 0.1uf caps on your PICs supply as close to the chip as possible.
try getting the signal from as close as you can to the source.... as to avoid long cables and noise....
try buffering your signal with op amp.


hope that helps...

gabriel
_________________
CCS PCM 5.078 & CCS PCH 5.093
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Fri May 21, 2010 8:06 am     Reply with quote

Are you reading from multiple input channels? When yes, you have to take into account some time for the input voltage to settle before starting the data conversion. How long this wait should be depends on the connected source impedance. See the PIC datasheet for more details.

Another issue is the processor clock speed and the ADC conversion clock. More on this in: http://www.ccsinfo.com/forum/viewtopic.php?t=42413&start=7
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