MCP23017 does not work

I’m mounting a MCP23017 on my minimal Zynthian to mount the 4 additional buttons (and to study them a bit). Putty sees the device but it doesn’t work… My minimal Zynthian works with the “staging 2305” firmware. I checked all the cables and tried to power it at both 3.3 and 5V…

You may want to validate it is your MCP23017 by disconnecting it and checking it does not appear in i2cdetect.

Then you need to configure webconf hardware. Show us you webconf hardware page.

1 Like

Thanks Riban
In the Putty window, with the SDA wire disconnected and then hot reconnected…


The MCP it is powered at 3.3V

Are the pins right?

Hi @Lanfranco !

What GPIO numbering style are you using? Webconf uses “wiringpi” style.


1 Like

Also, note that your encoder pin configuration is all 0s and it shouldn’t!

1 Like

Thanks @Jofemodo
So I have to rely on these numbers???

The encoders are unplugged for now, I’m trying to see if the 4 switches work.

Yes! Can you provide log output?

Can you please remind me how to get the log?

It is available in webconf but I find it easier / more complete to go to command line and use journalctrl, e.g.

journalctl -fu zynthian

will follow the log or

journalctl -ru zynthian

will show the log in reverse order (which is handy to look from the end, backwards).

The MCP 23008 works perfectly also with the Staging version… but I have few pins… While the MCP 23017 doesn’t work… neither with the Stable version… Did I do something wrong?
This is the wiring diagram I used…

Finally I mounted the MCP23008 and left the encoders directly on the GPIO of the Raspberry. The 4 buttons of the encoders on the MCP and I have 4 pins left for the 4 additional buttons… The MCP23008 doesn’t work… As soon as someone has time, can you explain to me how to set the 4 programmable buttons on Webconf? Thank you

Your last post is a bit confusing but I am going to make a guess that you now have the encoders and their push switches working and want to add 4 buttons and configure them. This is done in webconf Hardware->Wiring.

You add the extra switches GPI pin numbvers to “Switches Pins” then configure their actions below:

Note that these screenshots are from a V4 with MCP32017 hence the high (100+) pin numbers. If you are connected directly to Zynthian you need to use the WiringPi pin numbering scheme. Also be careful which pins you use. Some are in use for other functions and may not work or you may interfere with other actions.

1 Like

Perfect… many thanks
I connected the 4 encoders on the GPIO of the raspberry.
While the 4 encoder buttons and 4 programmable buttons on the MPC23008 (which has 8 pins available).