I/O port expander - MCP23017

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

I/O port expander - MCP23017

Post by krishnabalan »

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:


User avatar
jkinkennon
New User
Posts: 3
Joined: Tue Jul 28, 2015 6:37 am

Post by jkinkennon »

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.
krishnabalan
Member++
Posts: 24
Joined: Thu Aug 14, 2014 10:55 am

Post by krishnabalan »

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.
Post Reply