R
Robert Scott
- Jan 1, 1970
- 0
I needed to read a quadrature incremental encoder signal into a PIC
that has only counters, so I designed a decoder using D flip-flops and
some gates. I know this has been done to death, but I couldn't put my
finger on someone's previous design. So now I am wondering if my
design is anywhere near optimal. I know that it may not agree with
other designs in the case were the A-phase and the B-phase both change
within the same clock period, but I only care about the behavior when
the quadratue signals are slower than the HF-clock. The output of the
circuit is UP and DOWN count pulses that go to counters that I will
subtract in software. I hope the attachement (decode.gif) comes out
OK, so I don't have to render this schematic in ASCII graphics!
-Robert Scott
Ypsilanti, Michigan
(Reply through this forum, not by direct e-mail to me, as automatic reply address is fake.)
that has only counters, so I designed a decoder using D flip-flops and
some gates. I know this has been done to death, but I couldn't put my
finger on someone's previous design. So now I am wondering if my
design is anywhere near optimal. I know that it may not agree with
other designs in the case were the A-phase and the B-phase both change
within the same clock period, but I only care about the behavior when
the quadratue signals are slower than the HF-clock. The output of the
circuit is UP and DOWN count pulses that go to counters that I will
subtract in software. I hope the attachement (decode.gif) comes out
OK, so I don't have to render this schematic in ASCII graphics!
-Robert Scott
Ypsilanti, Michigan
(Reply through this forum, not by direct e-mail to me, as automatic reply address is fake.)