Unit MCP230XX
Return to Unit Reference
Description
The Microchip MCP23008 and MCP23017 are 8 or 16 bit I/O expanders that provide GPIO pin control functions over an I2C connection.
The device can be represented in Ultibo as a standard GPIO device which is accessible via the GPIO unit functions. Because the MCP230XX is a chip that can be used and configured in multiple different scenarios this unit does not autocreate a GPIO device, instead you need to call the function MCP23008GPIOCreate or MCP23017GPIOCreate and pass an I2C device and address. The functions will create and return a GPIO device with the appropriate number of pins and other information for the specified chip, the returned devices will have been registered with the GPIO device unit and started ready for use.
Both devices also come in an SPI interface version, these are not currently supported by this unit.
Note: This unit does not currently implement the interrupt capabilities of the MCP230XX chips however it could be expanded to allow the interrupt pin to be connected to a GPIO pin on the SoC and use a trigger event from that to enable GPIOInputWait/GPIOInputEvent functions for the MCP230XX chips.
Constants
To be documented
Type definitions
To be documented
Public variables
To be documented
Function declarations
To be documented
Return to Unit Reference