This page is to inform you about MIOS' handling of incremental rotary encoders, or just 'encoders' or 'encs' for short.
These are the endless-turning knobs that you can use to set values on your device. These should not be confused with a potentiometer. See the FAQ entry about encoders for more info regarding the distinction between the two, and the Where to order page for retailers.
Encoder mode: “DETENTED2”, 24 steps per turn
Pinout: http://www.avishowtech.com/mbhp/images/encspecs17.gif
Note: the rightmost picture is “top down” (as seen from the top of the encoder looking down to the shaft)
pin “A” goes to D1
pin “C” goes to Vs
pin “B” goes to D0
(This means that, encoder C pin is “common”. Encoder B pin goes to lower numbered DIN pin (of two pins assigned to that encoder) and encoder A pin to higher numbered DIN pin.)
the detent can be removed
Thanks go to:
mandingo: http://www.midibox.org/forum/index.php?topic=3843.msg25094#msg25094
jdutcher: http://www.midibox.org/forum/index.php?topic=3911.msg25766#msg25766
xcoulonx: http://www.midibox.org/forum/index.php?topic=3299.msg23699#msg23699
M-SW-ROT, detented rotary encoder from www.voti.nl or SoundWell EC162102E1B-HA1-006
Encoder mode: “DETENTED2”, 24 steps per turn
pinout: http://www.voti.nl/docs/rotary-encoder.jpg
if you view the encoder from the top with the pins pointing towards you;
left pin goes to D1 (highest numbered din pin)
middle pin goes to D0 (lowest numbered din pin)
right pin goes to Vs (ground)
the detent can also be removed
Pollin (http://www.pollin.de) has cheap encoders with button;
Encoder mode: “DETENTED”, 16 steps per turn
see:
http://www.pollin.de/shop/shop.php?cf=detail.php&pg=NQ==&a=Njg2OTU3OTk=
http://www.midibox.org/forum/index.php?topic=6693.0 (german)
http://www.midibox.org/forum/index.php?topic=7140.0
Pin connection is (laying the encoder before you, cap pointing towards you, pins on top):
0: GND (button)
1: pin A (eg D0)
2: GND (enc)
3: pin B (eg D1)
4: pin C (button, eg D2)
In applications, you have to choose one of the encoder types:
MIOS_ENC_MODE_NONDETENTED
MIOS_ENC_MODE_DETENTED
MIOS_ENC_MODE_DETENTED2
MIOS_ENC_MODE_DETENTED3
This image describes the different encoder modes which are natively supported by MIOS:
The encoders will behave with an 'acceleration' feature, similar to that of the PC mouse - when you turn the encoder faster, the values will increase at a faster rate. This mean that you can turn the knob slowly for more precise adjustment, or turn quickly for coarse adjustment of parameters.
This image describes how to remove detents from http:www.pollin.de encoders: