apox
Joined: 04 Jul 2004 Posts: 2
|
|
Posted: Sun Jul 04, 2004 5:52 pm |
|
|
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 |
|