Configuring two mcp23017 on a custom zynthian

I’ve just added a second MCP23017 (this type) to my Zynth. The first has 4x encoders and 4x buttons and has worked perfectly for a while now. I can’t get the second MCP talking with the extra buttons. Both MCP are present on the main webconf page with the addresses showing.

I read these two threads and understand that I need to make some selection on the ‘Zynaptik Config’ drop down to reveal the settings to configure the second MCP address and interrupts.

The pic is my config, I’ve configured the settings for the interrupt and the pins used for INT-A & B but it still doesn’t work. I also tried addresses x20 & x21 but no luck.

Some things I don’t understand:

  • When a Zynaptik option is selected, does it mean I don’t have to use the ‘200,201,202’ etc. in the Switches Pins field? I notice when I do both I get more button config selections than I have buttons (switch options don’t do anything on the second MCP either way I try)
  • Does it matter which Zynaptik option is selected? I assume 16xdio is the one I want for the buttons
  • Can I choose any I2C address or does it have to be fixed at a specific number e.g. x20 for the first one with the encoders

1 Like

Hi @LFO !

Nice to know you are expanding your zynthian, mate. I hope i can help you with it.

In custom configs you have to configure your second mcp23017 as zynaptik.
First mcp23017 are configured in the 100 range while second one (zynaptik) pins have to be configured in the 200 range.

As you don’t have analog input/outputs, you should select 16xDIO.

You have to select the right I2C address for each mcp2317. Selection must match the hardware config.

Regards

1 Like