Encoder loosing counts

Status
Not open for further replies.

addast

New member
Hello,
I have setup with teesny 4.1, Chinese linear encoder and 32x8 matrix based on max7219.
I use teensy Encoder library.
When I use basic example (without any other library) encoder works like a charm, but as soon as I add MD_Parolalibrary and call begin method, encoder starts skipping counts (even with ENCODER_OPTIMIZE_INTERRUPTS enabled).
I also tried to use this matrix without MD_Parola, just with MD_MAX72xx (Eyes example), but it still skips counts, less frequently though.
32x8 matrix connected to hardware SPI pins (10, 11, 13) and setup as hardware SPI with both libraries, I also tried as software SPI, but result is the same.
Encoder connected through level converter (TXS0108E) to pins 22 and 23.

What am I doing wrong and how to solve it?
 
Hello,
I have setup with teesny 4.1, Chinese linear encoder and 32x8 matrix based on max7219.
I use teensy Encoder library.
When I use basic example (without any other library) encoder works like a charm, but as soon as I add MD_Parolalibrary and call begin method, encoder starts skipping counts (even with ENCODER_OPTIMIZE_INTERRUPTS enabled).

Can you rule out interference - switching lots of LEDs generates EMI and if the wires run close together this might be an
issue. If the encoder only uses weak pullups try adding 1k or 2k2 physical pull ups on the encoder lines to stiffen them
up against cross-talk.
 
Status
Not open for further replies.
Back
Top