ModMyPi MCP23017 pHAT

Yeah I was trying to work out what the numbers mean (except for that I have something wrong)

MCP23017 Zynscreen has the following settings… (does it have 4 more buttons as well?)

Encoders A-pins:
102,105,110,113

Encoders B-pins:
101,104,109,112

Switches Pins:
100,103,108,111,106,107,114,115

So we have 16 pins in the game and if I presume 100 is our start address and count the pins up. Is this how it works?

100 - ctrl-1 2 - GPA0 - Switches Pins
101 - ctrl-1 3 - GPA0 - Encoders B-pins
102 - ctrl-1 4 - GPA0 - Encoders A-pins
103 - ctrl-2 2 - GPA0 - Switches Pins
104 - ctrl-2 3 - GPA0 - Encoders B-pins
105 - ctrl-2 4 - GPA0 - Encoders A-pins
106 - sw-1 2 - GPA0 - Switches Pins extra
107 - sw-1 3 - GPA0 - Switches Pins extra

108 - ctrl-3 2 - GPB0 - Switches Pins
109 - ctrl-3 3 - GPB0 - Encoders B-pins
110 - ctrl-3 4 - GPB0 - Encoders A-pins
111 - ctrl-4 2 - GPB0 - Switches Pins
112 - ctrl-4 3 - GPB0 - Encoders B-pins
113 - ctrl-4 4 - GPB0 - Encoders A-pins
114 - sw-1 4 - GPB0 - Switches Pins extra
115 - sw-1 5 - GPB0 - Switches Pins extra

so I clearly have something wrong.


These are the settings i just tried, and i got no results at all.


The wiring diagram for my hat. The board does not connect the interrupts itself. If I connect the interrupts to 36 and 37 my pi wont boot at all.


These are the labels on my rotary encoders. I thought I should be connecting the switches to 106, 107, 114 and 115 but maybe I should be connecting to 100,103,108 and 111? I have the grounds all connected. Do I need to connect the +ve too?

I really don’t want to have to submit and buy the original zynthian board and controllers, or use all my pi gpio pins directly either. :pleading_face: