[sdiy] Logic for rotary encoders

Paul Maddox P.Maddox at signal.qinetiq.com
Tue Jan 21 10:47:54 CET 2003


Leif,

> I've been looking into putting some controllers, rotary encoders... 40 of
> them to be exact... + some switches as well.

Thats a lot...

> I know that I can do groups of 16 and 16 encoders, and then use 74hc165 *
4
> (8 bit parallel to serial shift registers) per group of 16 to do a
> conversion of the data from 16 parallel inputs to a serial data
> stream...  but for 40 controllers we would get 12 chips... which is a lot.

yep, lots of chips..

> I only have a 8 bit port to use for the controllers, so I find the shift
> register thing ok, but not very good... Anyone know a better way to do it
?

Ok, a suggestion..
Tie one output of the rotary encoder to a diode, and then tie all the diodes
together (40 way OR gate) Also take this input to a stack of latchs
(74hc374's should do) and take the output of the OR gate to an IRQ line on
your micro.
The take the other output into some 8bit latchs... take the output of your
40way OR gate into the clock in of ALL the latchs.
So..
This gives you 10 latch chips...
Next you need a demux chip (4:16), take each output of this into the output
enable of the 74hc374.

Now, when you get an interupt you software should read all 10 latch chips
and you'll know exactly what state each rotary encoder is in..

Paul





More information about the Synth-diy mailing list