I/O port expander - MCP23017

XCore Project reviews, ideas, videos and proposals.
Posts: 24
Joined: Thu Aug 14, 2014 10:55 am

I/O port expander - MCP23017

Postby krishnabalan » 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://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.

  - 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.
User avatar
New User
Posts: 3
Joined: Tue Jul 28, 2015 6:37 am

Postby jkinkennon » Tue Jul 28, 2015 8:00 pm

I've been using the Centipede shield from macetech which puts four of these chips on an affordable board.  Two boards can be addressed easily from one port to provide 128 inputs or outputs.   Will be looking closer at this project when I'm more familiar with programming XMOS devices.
Posts: 24
Joined: Thu Aug 14, 2014 10:55 am

Postby krishnabalan » Wed Jul 29, 2015 7:06 am

Good to hear about the Centipede Shield.  This urges me to create an Arudino compatible board based on XMOS.  I will come up with one soon.

Who is online

Users browsing this forum: No registered users and 1 guest