I was getting bored with using mux chips and shift registers for front panels, so I thought I’d give it a go with Encoders and MCP23017 port expander chips. All Encoders, buttons and LEDs are directly attached to the MCP23017 chips that are connected to a Teensy 4.1 over i2c.
I had a spare evening so I…
Created a new encoder panel to replace the pots panel of my first AX-80 editor. Just missing a couple of MCP23017 chips.
Interesting and very impressive, as usual.
I would not have expected the I2C I/O expanders to be responsive enough.
Do you use interrupt on change?
How do you handle de-bouncing?
For the next version, you could attempt to do it with a single chip using an FPGA.
It’s very responsive even with the i2c at 100khz, although I run it at 400khz. I’m just polling the expanders for changes and acting on that. I’m using libraries to handle the encoders and buttons and the button lib has debounce in it. RotaryEncOverMCP, Rotary are the main two routines for handling encoders, I tried RoxMux and Adafruit_mcp23x17 but they don’t work well. I used these older versions of these libs and stored them locally, it’s the same libs as used in the XVA1 editor by McMannes.