Archive for the ‘Encoders’ Category

Incremental rotary encoders (Part 6)

Part 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 Some may say: why bother so much about rotary encoders? The answer is that I plan to use them extensively in combination with LCDs as multi purpose User Interface for my MicroXXX projects. In spite of its smooth operation, my latest production is not fully complying with the Good Interrupts Management […]

Incremental rotary encoders (Part 5)

Part 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 Now that we managed to optimize our code, what about making commands and functions available, while their source code would be kept invisible? This is what the libraries are all about! I am proposing here to decompose the steps from plain code to a (simple) library. First of all, me must […]

Incremental rotary encoders (Part 4)

Part 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 I must confess here that I was not feeling so comfortable at interrupts while writing the early posts on rotary encoders. But now things have changed and we even investigated a very interesting function which allows us to trigger a external interrupt on any change in state on one or more […]

Incremental rotary encoders (Part 3)

Part 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 The very first rotary encoder that I used had no integrated push button, which is a pity for designing human interfaces. I ordered a couple of ALPS encoders which integrate this feature. Note that the ALPS encoders (at least the ones that I received) generate 4 state changes during one rotational […]

Incremental rotary encoders (Part 2)

Part 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 Fed up rotating the encoder’s knob? It is time to improve a little bit our counting technique. The encoder reading routine analyses the interval between two counts. If this interval is more than a certain time (in our case 100 ms), the counter is incremented or decremented by unitary steps. If […]

Incremental rotary encoders (Part 1)

Part 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 Note: This post is the starting point for a whole series of post dedicated to rotary encoders. Please read through thme all in order to benefit from all the improvements brought to the original code.You may also want to read about this  heat control application which features encoders. An absolute encoder has a […]