Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 6 months ago.
MCP23017 Help
Sorry ahead of time, as I am newer to the microcontroller world.
So I am using an lpc1768 and a MCP23017 connected via I2C. Basicly all I want help with is setting up the code to communicate properly.
I am using this library https://developer.mbed.org/users/jimherd/code/MCP23017/
I am having a hard time finding examples that use the IO expander as an input. Everything I find shows it being setup and an output. I don't need all the code, just the necessary parts for getting the chip communicating and an example of how to check for changes on one of the pins, and maybe how to attach a function to an interrupt. If it makes it any easier I am planning on connecting momentary push buttons to the mcp23017.
Thanks!