mcp23017 and rotary encoder issue. Both GPIO's could be shorting themselves out.

Hi all.

I'm having a slight issue with my mcp23017 not being detected if I turn my rotary encoder too fast. My rotary encoder has three pins, the middle for ground, and the other two connected to two pins (1 and 2) on my mcp23017.

Now, I think I may no the problem. It seems that if I turn the rotary encoder too fast, it shorts out both of the GPIO's instead of just one of them (pin1 || pin 2).

Could somebody please tell me if they've had similar issues please?

Thanks,

Now, I think I may no the problem. It seems that if I turn the rotary encoder too fast, it shorts out both of the GPIO's instead of just one of them (pin1 || pin 2).

For a start no it doesn't. And even if it did it would not stop the chip from being detected. Maybe you are using the wrong word? How have you wired it up and what is your code.

A rotary encoder works by proceeding through a sequence where it contacts one output terminal, then both, then the other only, then neither and repeats this four step cycle. That is the only way it can work, called "Gray code" or "quadrature" encoding.

My strong suspicion is that you have a problem in the code, possibly the use of delay() calls in an ill-conceived attempt to provide "debouncing".