Driver for a Microchip MCP23008 (I2C) or MCP23S08 (SPI) bus expander..
The MCP23008 is a 8-bit I2C port expander and the MCP23S08 is an 8-bit SPI port expander where each of the bits can function as either an input or an output.
All correct at time of writing, but as always, manufacturers love to move things around on their website.
MCP23008
http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en021393
MCP23S08
http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en021817
http://www.microchip.com/downloads/en/DeviceDoc/21919e.pdf
This code has been tested using a SolderCore controlling a SenseCore.
Constants | |
MCP23008_I2C_ADDR | 8-bit I2C address for MC23008 |
Functions | |
mcp23x08_initialize_i2c | Initialize bus expander on I2C bus |
mcp23x08_initialize_spi | Initialize bus expander on SPI bus |