SukkoPera / arduino-soft-mcp23017

Complete support of MCP23017 via fast software I2C (400 kHz!)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Soft MCP23017 for Arduino

License

This library provides full control over the Microchip's MCP23017, including interrupt support, via software i2c.

The software i2c implementation used is FastI2cMaster, contained in the DigitalIO library by greiman, which achieves 400 kHz i2c communication on any pins of a 16 MHz Arduino (!).

This library is based on v2.0.0 of blemasle's library.

Features

  • Individual pins read & write
  • Ports read & write
  • Registers read & write
  • Full interrupt support

Usage

Unlike most Arduino library, no default instance is created when the library is included. It's up to you to create one with the appropriate chip I2C pins and address.

#include <MCP23017Fast.h>

const uint8_t SCL_PIN = A4;
const uint8_t SDA_PIN = A5;

MCP23017<SCL_PIN, SDA_PIN> mcp(0x20);

See the included examples for further usage instructions.

About

Complete support of MCP23017 via fast software I2C (400 kHz!)

License:MIT License


Languages

Language:C++ 100.0%