Hi at all,

I bought the Teensy 4 few days ago and now I have to prototype a board that must read 2 linear encoder (TTL).

I bought also a bidirectional signal converter 3.3 to 5V witch mount a TBX0108

I've tried the sample Encoder (inside Teensyduino installer) and works fine a "slow speed", the problem appear when I move fast the linear encoder... some counters are lost.
I've put a #define ENCODER_OPTIMIZE_INTERRUPTS as mentioned in this tutorial https://www.pjrc.com/teensy/td_libs_Encoder.html and I obtain better result but I always lost some counters.

If I understand correctly the max frequency of the linear encoder is 500KHz (120meter / min), so 500ns every 90.
This evening I can connect the oscilloscope and catch the waveform to try to understand and see the signals.

In the meantime do you have any advice?
What can I have to check or verify?

Finally, I read this post https://forum.pjrc.com/threads/57159-encored-T-4-0 and I don't understand if the quadrature encoder signals (QEI) are available on Teensy 4 and supported by the Encoder library.

Thank you so much, any suggestions will be appreciated.