<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<pre>Howdy DPRG
As mentioned in the RBNV this evening, Dave Ackley forwards the following logic table for decoding
quadrature encoder which are triggered on rising and falling edges of both A and B channels using XOR.
Channel A, rising edge. XOR Action
Forward: A = 1 and B = 1 0 => decrement \
Reverse: A = 1 and B = 0 1 => increment \
\ Channel_A_Any_Change:
Channel A, falling edge. / If ( channel_A ^ channel_B) count++;
Forward: A = 0 and B = 0 0 => decrement / else count--;
Reverse: A = 0 and B = 1 1 => increment /
------------------------------------------------------
Channel B, rising edge.
Forward: A = 0 and B = 1 1 => decrement \
Reverse: A = 1 and B = 1 0 => increment \
\ Channel_B_Any_Change:
Channel B, falling edge. / If ( channel_A ^ channel_B) count--;
Forward: A = 1 and B = 0 1 => decrement / else count++;
Reverse: A = 0 and B = 0 0 => increment /
Thanks Dave.
cheers!
dpa
</pre>
</body>
</html>