Comments (5)
I just tried your sketch without any changes. My board was an Arduino Nano. I connected all GPIOs of the MCP23S17 to LOW (GND) except A6, which was connected to HIGH (VCC). That should be the same like you did. By the way, "01000000 00000000" would mean that A6 is HIGH and not A7.
My result is as expected:
And it also works with A7 HIGH and the rest LOW. So, I can't reproduce the issue.
At least with an MCP23S17 it should also work on your side. For the MCP23017 there is one known issue with GPIOA7 and B7. Microchip has changed the design and as a result these pins can only be used as outputs.
Not sure what else I can say or do. Maybe you can provide some more details of your microcontroller and the circuit?
from mcp23017_we.
Hello wollewald,
thanks for your quick reply and test!
Here is more information regarding the circuit diagram, Chip and Serial Output.
Problem description:
At the moment when one of the two pins (GPA7 or GPB7) are connected, a "0" is removed from the output. When it set to high, the full number (16) will show. See on the image. This behavior does not appear with the other pins. Therefore difficult to deal with since we need all the 128bit inputs with 8 chips :-)
We have try first the MCP23017 and had the problem with the two pins and have think its the chip input problem. So we order the MCP23S17 and there have the same behavior.
Could the wiring be wrong or the code reading of the 16 bit inputs?
Order MCP23S17: https://www.reichelt.at/at/de/bus-controller-push-pull-s-dil-28-mcp-23s17-e-sp-p90047.html?&trstct=pos_0&nbc=1
from mcp23017_we.
Preceding zeros are not displayed, i.e.: 0b01111111 = 0b1111111. So, if you push the button connected to at GPA7 you should get:
1111111 11111111 or if you print in decimal numbers: 127 255 or in hex: 0x7F 0xFF
Did you expect:
01111111 11111111 ?
Or did you expect:
11111110 11111111 ?
The latter is what you get if you pull GPA0 to LOW.
from mcp23017_we.
would have imagined i get: "01111111 11111111".
in this case the mystery has been solved, chips are working correctly :-)
Thank you for your time!
from mcp23017_we.
Great! Happy to hear that.
And it had a good side effect because while working on the issue I have noticed that I had a typo in one of the file names of the examples sketches. And therefore it was not displayed as example in the Arduino IDE.
from mcp23017_we.
Related Issues (19)
- 4 Rotary encoders HOT 11
- Compile warnings HOT 2
- Make reset pin optional HOT 7
- How to change I2C address HOT 4
- Invert pin state HOT 5
- GPA7 and GPB7 not work as input HOT 7
- Works for Arduino? HOT 3
- How to use an AC solid state relay to also switch DC? HOT 7
- Support for MCP23S17 HOT 12
- add LICENSE HOT 1
- setPinMode vs setPortMode -> INPUT_PULLUP HOT 2
- Make MCP23s17 reset pin optional HOT 3
- Using multiple MCP23S17 devices does not work HOT 10
- v1.6.1 breaks something HOT 3
- license type not mentioned in headers
- random pins are driven HOT 3
- Multiple MCP23017 outputs don't always work HOT 4
- How to check if MCP23017 is connected and responsive? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mcp23017_we.