-->
Page 1 of 1

16-bit I/O expander library for I2C bus

PostPosted: Sat Sep 24, 2016 10:11 pm
by OldBikerPete
Attached is my Arduino library for the Microchip MCP23017 and MCP23018 I/O expander chip. It uses the Arduino Wire library and was developed on a WeMOS D1 mini.
NOT FULLY TESTED.
The input and interrupt facilities have not been tested but the output has been tested and works.
This chip has three addressing pins, so up to eight chips can be chained on an I2C bus for 128 bits of programmable I/O.
By means of uncommenting and/or changing #defined values, the library can be compiled to be as small as possible with support for output on one chip only and no interrupt support, or can be compiled to support all 8 chips with full interrupt support and a callback function for interrupt support on each individual pin.

Re: 16-bit I/O expander library for I2C bus

PostPosted: Sun Sep 25, 2016 1:09 am
by KevinA
Good work! I have some parts I was going to build a PCB (need P&P machine to finish) but I just found:
http://www.mlt-group.com/Products/Raspb ... spberry-Pi
and https://goo.gl/hhB8Mq but I'll bay more for the device that can also be used on the PI.