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

Potentiometer

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



Joined: 24 Mar 2015
Posts: 14

View user's profile Send private message

Potentiometer
PostPosted: Tue Mar 24, 2015 1:46 am     Reply with quote

Hi, I 'm making a data acquisition unit for a two-wheeled vehicle. And I want to purchase four variables, temperature, fuel level, speed and accelerations. If the fuel level simulate with a potentiometer, because the sensors with a minimum quality are expensive. I have many problems to program the potentiometer, to observe that performs the instructions I give him correctly, I tried different programs but do not work. If someone could help me, to be able to do, would be very grateful.

Thanks.
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

PostPosted: Tue Mar 24, 2015 2:49 am     Reply with quote

You're not giving us mch to work on.

1) PIC.
2) Compiler version.
3) Sample of what you've tried.
4) Resolution/accuracy required.
5) ..................
6) ..................

For a simple pot you connect:-

a) One end to GND.
b) Other end to Vref.
c) Wiper to ADC input.

Then use PIC's ADC

Mike
gpsmikey



Joined: 16 Nov 2010
Posts: 588
Location: Kirkland, WA

View user's profile Send private message

PostPosted: Tue Mar 24, 2015 12:12 pm     Reply with quote

Making sure the value of the pot is high enough to not conduct more current than it is rated for at that voltage, but low enough to meet the input impedance requirements of the selected PIC (see the data sheet for the input impedance requirements for your selected PIC). I would also use a capacitor from the wiper to ground to help suppress noise etc.

mikey
_________________
mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3
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