Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does this library work on ESP8266? #5

Open
cb88 opened this issue Jul 20, 2016 · 5 comments
Open

Does this library work on ESP8266? #5

cb88 opened this issue Jul 20, 2016 · 5 comments

Comments

@cb88
Copy link

cb88 commented Jul 20, 2016

I'm designing a board around the ESP-WROOM-02 and have and am planning on using the MPC23S18 as IO expansion due to it's small size 4x4mm and I only needing 3 outputs (1 IRDA shutdown and 2 outputs though an optoisolator). If I had needed more outputs I probably would not have used the open drain version despite it's small size.

I forgot the pullup resistors on my 2 optoisolator outputs but I'll just hack them on for testing once I have the boards in hand. I'll be sure you let you know how it goes.

@cb88
Copy link
Author

cb88 commented Jul 20, 2016

So I went through and deleted all but MCP23s18 MCP23s17 .cpp and .h and also commented out from those getInterruptNumber(byte pin) and #include <avr/interrupt.h> in gpio_expander.cpp this gets me to a building library but I haven't tested it yet.

@tonton81
Copy link

I dont know if its compatible or not but if you know how spi works you can write your own code to set the pins on the mcp23s17/18's, i wrote one but its private for my own use, 4 functions are all you need, with the added bonus of not cycling devices when rebooting the mcu and hot-pluggable! I havnt seen libraries do this :)

Sent from my iPhone

On Jul 20, 2016, at 2:45 PM, "cb88" <[email protected]mailto:[email protected]> wrote:

So I went through and deleted all but MCP23s18 MCP23s17 .cpp and .h and also commented out from those getInterruptNumber(byte pin) and #include in gpio_expander.cpp this gets me to a building library but I haven't tested it yet.

You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com//issues/5#issuecomment-234043443, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQHrjMCHnauB0xq6Zx6StdyR3ktOQAFbks5qXmzGgaJpZM4JQ3ly.

@sumotoy
Copy link
Owner

sumotoy commented Jul 20, 2016

A new library for MCP23S17 is coming in a couple of days.
I decided to keep the interrupts separate so you can esily handle yourself. As always I provide a lot of examples (included some advanced that uses in/out rotation never released in any library to handle large matrices).
Apart the interrupt suff (that you can handle separately) the library should work as is but if you can wayt a couple of days you will see a better specialized library.

PS
I suggest use the MCP23S17 instead MCP23S18, the only main difference is the open drain output, if you really need this it's very easy to adapt since it uses the same registers.

@cb88
Copy link
Author

cb88 commented Jul 20, 2016

Yes, I'm aware, the board's I've ordered already have MCP23S18 on them and it isn't a direct swap as the foot print is different and as I mentioned earlier it is larger. On the upside the open drain outputs can sink more current and I do understand how they work.

@sumotoy
Copy link
Owner

sumotoy commented Jul 23, 2016

library moved here: https://github.com/sumotoy/gpio_MCP23SXX
Beware, MCP23S18 doesn't have HAEN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants