GPIO + MCP23017 input/output numbering #24429
Replies: 1 comment 1 reply
-
|
Not sure what you mean by "can I adjust". You post a change simply omitting the two pins with the issue you found, and then move the numbers down to keep an unbroken sequence of 128-141 instead of 128-143. What would the possible problem be here? When it comes to combining with native gpios, the usual way is that native pins gets the first numbers in the order, with others added after that. To be clear, not having worked with MCP23017, I'm not stating this as a "fact", only mentioning a more general approach used by Tasmota. Still, this seems to align with your question, and not "the other way around". But just try it to confirm how it worked. You can do that without wiring anything, just configure a native gpio, and check if the expander ones moved. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have a design where I use two MCP23017 on MODE 2, one for inputs and the other for outputs. Everything works perfectly.
What happens is that i just found about a bug on the MCP23017 die that can disrupt I2C communications when pins GPA7 or GPB7 are used as inputs, so I need to disable them. I will move those inputs to GPIOs 34 and 35 on the ESP32. What I need to know is how the inputs will be numbered in that case, and how to adjust mcp23x.dat. Will the inputs on the ESP32 numbered as IN1 and IN2, and the inputs on the MCP as IN3 to IN16, or the other way around?
Here's my current mcp23x.dat:
{"NAME":"MCP23017 expanders","BASE":0,"GPIO":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239]}The docs mention using relative or absolute numbering on mcp23x.dat using "BASE":0 or "BASE":1, but I see nothing about mixing MCP with GPIO, so I thought better ask to be sure. If I keep relative ("BASE":0), can I adjust mcp23x.dat as below?
{"NAME":"MCP23017 expanders","BASE":0,"GPIO":[128,129,130,131,132,133,134,0,135,136,137,138,139,140,141,0,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239]}Thanks.
Tales
Beta Was this translation helpful? Give feedback.
All reactions