Rotary Decoder timing question

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi Folks,

I've built a PC interface that utilizes the parallel port and polls switches
via addressing multiple16 input multiplex chips (4097s).  To maximize lines
I used SIPOs to select both chip (0-7) and input (0-15).  However my polling
loop maxes out at about 30-40ms because of this bottleneck and often polls
more slowly as the software acts immediately on this info and can bog things
if there are a lot of events assigned to switches (average 60ms).

I have tried using quadrature rotaries with this interface using a decoder
based on the PIC16F676.  They work okay but it appears I'm missing a lot of
the output (monitoring a digital display that should increment/decrement in
response to the rotary).  The designer advised me that they were programmed
for use with a 10ms polling loop in a microcontroller circuit but that with
a few modifications they could be "tuned" to a 60ms polling loop.

I haven't had a chance to program the chips with his new firmware but will
be trying soon.  However could someone verify that one can in fact "tune"
the output of a decoder to accomodate a slower polling speed and that I
might see better performance e.g. less "misses" and smoother
increment/decrement?  I'm thinking of designing my own decoder around an
8051 but wondering if it is reasonable to expect I can use quadrature
rotaries with an interface that polls at 60ms intervals.  I know the 8051
can handle the decoding but can I get meaningful info into the PC at its
60ms rate on the other side of the decoder?  How slow can I go <G>?



Re: Rotary Decoder timing question
On Tue, 11 May 2004 23:45:09 -0400, the renowned "petdoc"

Quoted text here. Click to load it

I find around 2.5ms is about right for a mechanical rotary encoder
with 18 detents (and bounce). 60ms sounds WAY too slow. Depends on how
many detents etc and how big the knob is and how fast it is rotated,
of course.

If the microcontroller is keeping track of the +/-counts internally it
can pass along multiple counts over a bottleneck and still not miss
any. I believe PC mouse controllers do something along those lines.

Best regards,
Spehro Pefhany
"it's the network..."                          "The Journey is the reward"             Info for manufacturers:
We've slightly trimmed the long signature. Click to see the full one.

Site Timeline