Giter Site home page Giter Site logo

Comments (5)

wollewald avatar wollewald commented on June 18, 2024

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:

Screenshot 2023-10-29 013823

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.

dev-markus avatar dev-markus commented on June 18, 2024

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

Circuit, Chip, Serial Output:
Unbenannt

from mcp23017_we.

wollewald avatar wollewald commented on June 18, 2024

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.

dev-markus avatar dev-markus commented on June 18, 2024

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.

wollewald avatar wollewald commented on June 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.