Hi all, i have a naive idea to decode an incremental encoder....
So, quad pulse from encoder (Ch.A & Ch.B) are pulled-up then filtered and decoded into up& down pulse trains with a dual flip-flop.
Uppulse-->Tim0 clock input (counter)
Dnpulse-->Tim1 clock input (counter)
When motor rotates forward, only Uppulse counter will be incremented. Likewise, when motor rotates reversed, only Dnpulse counter is incremented.
Hence, the position is expressed in-term of integer value, a user entered position (number), say forward 50,
50>=Uppulse? no, then continue....else stop and reset Uppulse counter.
It is applicable? please advice...
So, quad pulse from encoder (Ch.A & Ch.B) are pulled-up then filtered and decoded into up& down pulse trains with a dual flip-flop.
Uppulse-->Tim0 clock input (counter)
Dnpulse-->Tim1 clock input (counter)
When motor rotates forward, only Uppulse counter will be incremented. Likewise, when motor rotates reversed, only Dnpulse counter is incremented.
Hence, the position is expressed in-term of integer value, a user entered position (number), say forward 50,
50>=Uppulse? no, then continue....else stop and reset Uppulse counter.
It is applicable? please advice...
Last edited: