# Quadrature Encoder to up/down pulses with discrete logic - paging logic gate gurus

Discussion in 'Embedded' started by Spehro Pefhany, Apr 21, 2004.

1. ### Rich GriseGuest

Well, when you're at the detent, B is indeterminate. But A is high.
So, when A is high, ignore B.

When A is low, a low-to-high on B means "one click clockwise", and
a high-to-low on B means "one click counter-clockwise". What's so

Cheers!
Rich

Rich Grise, Apr 23, 2004

2. ### Spehro PefhanyGuest

Debouncing and optimizing the logic into a minimum number of easily
available packages. It's also a bite-sized amusing problem that a few
people here can solve with their eyes closed.

Best regards,
Spehro Pefhany

Spehro Pefhany, Apr 23, 2004

3. ### petrus bitbyterGuest

http://www.speff.com

Spehro,

Can't find my first reply and I may have missed some others as well thanks
to the quality of the newsserver of my provider. :-(

Nevertheless, after a good nights sleep, some thinking and reading the
available replies I came to the circuit below. The XORs are providing short
clockpulses on each edge that clocks the value of the other signal in a
D-flipflop. You can make the delay somewhat longer by an RC-combination if
required. Bounce does not matter, it only clocks the same data once more.
Some more thinking makes me believe I saw a circuit like this in an Elector
issue. Must be many years ago.

View with fixed font

+---------------+
| | .----. Bo
Ai | __ | +-|D Q|---
---+-+----------| | | | | |
| __ |=1|-|---|-|> |
+---| | +--|__| + + | |
|=1|--+ \ / | |o--
+-|__| X '----'
| / \
| +----------+ + .----. Ao
Bi === | __ +-|D Q|---
--+-------+-----| | | |
| __ |=1|-------|> |
+----| | +-|__| | |
|=1|---+ | |o--
+-|__| '----'
|
|
===
GND
created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de

petrus

petrus bitbyter, Apr 23, 2004
4. ### GPGGuest

The board does not care. It can be set so that a positive or a negative
or both edges result in a keypush

GPG, Apr 27, 2004
5. ### Fred BloggsGuest

Your idea is flawed in the context of the subject encoder-

Fred Bloggs, Apr 27, 2004
6. ### GPGGuest

Does not supply directional info.

GPG, Apr 27, 2004
7. ### GPGGuest

Clever- the same can be done with an HC neg edge triggered FF, but
If you are using it with a conventional pc keyboard, turn off repeat,
the reset will occur when the input changes F or Rev.

GPG, Apr 28, 2004