Button Box with Leonardo 5 Rotary Encoders is it possible.

Hi Guys,

I am currently designing a button box, and as all projects research is needed.

I have never used a rotary encoder, but have looked into how to use and code.

Hopefully mine will arrive shortly for me to play....

This question is using a Leonardo is it possible to use 5 encoders (non polling.)

I see that the Leonardo has 5 External Interrupts as shown Reference/AttachInterrupt

I also understand that to use the encoder will need at least 2 interrupts per encoder.

However i have read that it may be possible to use a single external interupt pin and a (a)nother pin non interupt for the other output for the encoder ?? but cannot find the article i read a month ago.. >:(

Leonardo Pin Layout

Also it would seem that the 5th External Interrupt ( pin 7.) will need some code adjustment ..

External Interupts 5th Pin Adjustment Code

If you have any possible any suggestion or code suggestions welcome.

Thanks

Neil

Why not simply use polling?

By polling is there not a chance that i will miss a pulse change of the encoder ?

if polling method is an option, can i connect 5 encoders ?

Thanks

Neil

Calculate yourself how many pulses will arrive per second, when the encoders move at maximum speed (driven how?).

AFAIR (pin change) interrupt handling is limited to about 100kHz in software - please correct me if I'm wrong. Polling a port for 8 signals at once could be faster.