3 ms·
Quadrature decoding is extremely common in microcontrollers, though the peripheral may not be called a quadrature decoder. Normally they just make the counter p
by IshKebab 6y ago
Quadrature decoding is extremely common in microcontrollers, though the peripheral may not be called a quadrature decoder. Normally they just make the counter peripheral flexible enough to do it.
Example for the ESP32: https://github.com/espressif/esp-idf/tree/73db142/examples/peripherals/pcnt/rotary_encoder https://github.com/espressif/esp-idf/tree/73db142/examples/p...
I would not be surprised if you don't need PIO for this on this chip.
- MatthiasWandel 6y agoHad not thought of that. But that will give me one count per bar that goes past the encoder, yet there are four transitions that could potentially be counted. Of course, the pulses are not precisely symmetrical, so the four sub-counts are potentially not the same size.