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

varible dial/knob question

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







varible dial/knob question
PostPosted: Tue Aug 24, 2004 8:23 pm     Reply with quote

I want to have a varible dial, I thinking many a pot attached to an analog pin and read it that way.. What are some other ways?

Nick
Yashu



Joined: 08 Oct 2003
Posts: 26

View user's profile Send private message

Re: varible dial/knob question
PostPosted: Tue Aug 24, 2004 8:41 pm     Reply with quote

Nick wrote:
I want to have a varible dial, I thinking many a pot attached to an analog pin and read it that way.. What are some other ways?

Nick


quadrature optical encoder
kender



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

PostPosted: Wed Aug 25, 2004 9:34 am     Reply with quote

... or a Hall effect encoder, or a mechanical encoder.
newguy



Joined: 24 Jun 2004
Posts: 1903

View user's profile Send private message

PostPosted: Wed Aug 25, 2004 10:39 am     Reply with quote

I guess the answer depends on what sort of control & feel you're looking for.

If you want something cheap and can spare two pins of port b (b4 - b7), then a mechanical encoder is the way to go. For example, see: http://ca.digikey.com/scripts/DkSearch/dksus.dll?Detail?Ref=96152&Row=342823&Site=CA

To use something like this, just connect the two outputs directly to two pins on port b, enable the b pullups, and use the interrupt-on-change to detect when the encoder was turned. The drawback? It might not feel very "fine" to the user (i.e. relatively large turn required before something changes).

A pot only requires one analog pin, but it may be noisy. Another thing to consider is that the large "front panel" type of pot you'd need tend to be pricey. They also tend to get dirty with age. I'm reminded of the old car radios that would crackle badly whenever you touched the volume knob.
Nick
Guest







PostPosted: Wed Aug 25, 2004 10:43 am     Reply with quote

perfect, thanks for that link!


Nick
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