I/O port expander - MCP23017
Posted: Wed Jun 10, 2015 8:12 pm
Version: 1
Status: Public release
License: BSD
Download: /files/project_builds/i2c_port_extender.zip
MCP23017 is a I/O expander chip from Microchip Technology. It provides 16 I/O lines which are controlled over a I2C serial interface.
More information on this chip is found here:
http://www.adafruit.com/products/732
http://ww1.microchip.com/downloads/en/D ... 21952b.pdf
This project is a simple application/library that provides functions(APIs) for you to use the MCP23017 device with any XMOS multicore microcontroller.
Notes:
- Any two one bit port of the XMOS device can be designated as SCL and SDA lines of the I2C.
- Connect these I2C lines to the MCP23017 device; Set an I2C address for the MCP23017 by the ADDR 0..3 pins.
- 'app_i2c_port_extender' application contains main.xc, mcp23017.h and mcp23017.xc. The mcp23017.h file has the API functions that comes handy in using the MCP23017 device. main.xc has a simple demo application that shows how to use those API functions.
- Use xTIMEcomposer 14.0 or later to compile and run the project.
If you find your project to run out of I/O lines, then you can easily hookup an MCP23017 to the XMOS device and get 16 bi-directional I/O lines by just using two I2C lines.
Images:
Status: Public release
License: BSD
Download: /files/project_builds/i2c_port_extender.zip
MCP23017 is a I/O expander chip from Microchip Technology. It provides 16 I/O lines which are controlled over a I2C serial interface.
More information on this chip is found here:
http://www.adafruit.com/products/732
http://ww1.microchip.com/downloads/en/D ... 21952b.pdf
This project is a simple application/library that provides functions(APIs) for you to use the MCP23017 device with any XMOS multicore microcontroller.
Notes:
- Any two one bit port of the XMOS device can be designated as SCL and SDA lines of the I2C.
- Connect these I2C lines to the MCP23017 device; Set an I2C address for the MCP23017 by the ADDR 0..3 pins.
- 'app_i2c_port_extender' application contains main.xc, mcp23017.h and mcp23017.xc. The mcp23017.h file has the API functions that comes handy in using the MCP23017 device. main.xc has a simple demo application that shows how to use those API functions.
- Use xTIMEcomposer 14.0 or later to compile and run the project.
If you find your project to run out of I/O lines, then you can easily hookup an MCP23017 to the XMOS device and get 16 bi-directional I/O lines by just using two I2C lines.
Images: