This is a discussion of well behaved (YMMV), interrupt driven, rotary encoder switch interfacing.
"I wish I were dumber so I could be more certain about my opinions. It looks fun." -- Scott Adams
your word doc describes exactly what I need to do! Very cool. Do you have any sample code?
Unfortunately I don't have any code, although it's easy from the description to write. You might start a new thread asking for some if you need it. I'm sure many people have some they'd be glad to share.
I have written some code which works fine for me, but:
a) it must be called from timer interrupt
b) requires one variable to remember the last state
c) regonises only full steps (which I found better for 'device behaviour').
Some time ago I tried using two external interrupts, but with no success.
From the .doc file:
The jitter settles out by itself without the debouncing, however, and for many applications would not be a problem.
Anyway, if you're interested in my code (and if it applies here), please let me to know.
© 2018 Microchip Technology Inc.