Using more than 4 encoders

Our team is having trouble using more than 4 quadrature encoders at one time. If we only use 4 or less, everything functions perfectly. When the 5th encoder is added in to the mix strange things begin to happen. The first allocated encoder stops working and the 5th encoder movement appears for both the 5th and 1st encoder.

At first we thought this was a function of our competition code (we use another level of abstraction with the encoders). We then reproduced problem in a SimpleRobot project (see attached). Are we just making a really stupid mistake or can someone verify this issue?

MyRobot.cpp (2.2 KB)

MyRobot.cpp (2.2 KB)


In brief, there are only four “4x” encoders in the hardware. Selecting “1x” or “2x” encoders uses hardware counters instead.

Well that makes perfect sense… should have looked deeper in to the hardware behind reading the encoders. I’ll drop one of the encoders down to 2x and see if that helps tomorrow. Thanks!