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

Optical Encoder

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







Optical Encoder
PostPosted: Fri Jul 02, 2004 1:06 pm     Reply with quote

Help me with program of optical encoder were at 1-st out - logical 1
and at second out pulse freq.
[/img]
apox



Joined: 04 Jul 2004
Posts: 2

View user's profile Send private message

PostPosted: Sun Jul 04, 2004 5:52 pm     Reply with quote

I am not sure what your question is,but if you are trying to
get a count for an optical encoder input, you just have to make a simple state machine.
The inputs are either 0,0 or 0,1 or 1,0 or 1,1
so their are 4 states, only 1 bit will change at a time,
so as long as you know the last state, you know the new state
to go too, and you either increment your counter by 1
or you decrement your counter by 1

Or, you can buy the LS7083 chip from US digital to convert
your quadrature encoder into a up/dn pulse, which can feed into
one of the timer pins.

-Craig
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