[sdiy] Rotary encoder reading.. hardware solution (fast & accurate)
mbryant at futurehorizons.com
Thu Aug 12 01:51:46 CEST 2021
Wait until somebody proposes a discrete transistor version ! :-)
From: Synth-diy [mailto:synth-diy-bounces at synth-diy.org] On Behalf Of Tom Wiltshire
Sent: 11 August 2021 23:38
To: Jean-Pierre Desrochers
Subject: Re: [sdiy] Rotary encoder reading.. hardware solution (fast & accurate)
Gagh! Two whole chips to save writing a few lines of code! Heresy! ;)
On 11 Aug 2021, at 21:27, Jean-Pierre Desrochers <jpdesroc at oricom.ca<mailto:jpdesroc at oricom.ca>> wrote:
For anybody who could be interested..
Just found this video yesterday and tried the circuit..
Outputs A and B (CD4013) connected to PORTB of a PIC16F1783
(RB0 and RB1) using interrupts on change (rising edges).
Now I only have to check one incoming pulse on each RB0 & RB1
to increment or decrement a counter.
Much faster than computing all the 4 possible states in each encoder step
to finally get a result.
My interrupt uses TIMER1 (1msec steps), RB0 & RB1 on change.
No missing counts anymore even rotating fast, on both direction.
Synth-diy mailing list
Synth-diy at synth-diy.org<mailto:Synth-diy at synth-diy.org>
Selling or trading? Use marketplace at synth-diy.org<mailto:marketplace at synth-diy.org>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Synth-diy