After an hour studying the SAM3X manual, I am getting a vague idea of how the decoding works - but can an example of how to also count the index be added to the working code example?
I am trying with an interrupt for the index, but the counts are low and drop more when the encoder is spun faster (TS5303 - can handle 5000RPM, pulses dropped at perhaps 100RPM).
I'm using 4N35s - perhaps they aren't switching fast enough?
Last question : the count keeps increasing, does it eventually overflow? can it be reset (per rev)? how is this normally handled?
I would be very appreciative of help here