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

HELP! Reading two ADCs. Reading two potentiometer signals.

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



Joined: 27 Jun 2010
Posts: 3

View user's profile Send private message

HELP! Reading two ADCs. Reading two potentiometer signals.
PostPosted: Sun Jun 27, 2010 8:53 pm     Reply with quote

Hello everyone,

Right now I am working on a project with a DC motor and I need two potentiometers: one for sensing and one of reference (related to control systems) The thing is that I need to compare, maybe using if-else statements, the readings of two potentiometers whether one is bigger or lesser than the other. If anyone can help me on how to set this up in CCS it I will appreciate.

Thanks in advance,
LM
lmachuca



Joined: 27 Jun 2010
Posts: 3

View user's profile Send private message

PostPosted: Sun Jun 27, 2010 9:00 pm     Reply with quote

I'm using a PIC16F877A.
mutthunaveen



Joined: 08 Apr 2009
Posts: 100
Location: Chennai, India

View user's profile Send private message

hard work never fails
PostPosted: Sun Jun 27, 2010 11:07 pm     Reply with quote

lmachuca Rolling Eyes Rolling Eyes Rolling Eyes

better try in the CODE section for ADC voltmeter code (or use search posts (code posts) in this blog) u can get some sort of info...... no one here are ready to work for your requirement.

sorry if i hurt u...... (even i started same like u) I don't know any thing 8 months before (now i get some knowledge) this forum helped me a lot in understanding....


thanks Arrow
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Jun 28, 2010 11:44 am     Reply with quote

This thread has sample code to read the ADC and compare it to
the previous value. That's not exactly what you want, but it should help.
http://www.ccsinfo.com/forum/viewtopic.php?t=41229

See this thread which shows how to expand that code so it
will read two ADC channels:
http://www.ccsinfo.com/forum/viewtopic.php?t=42007
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