MCP23017 Input Using I2C

The MCP23017 is a 16-bit, general purpose parallel I/O port expander for I2C bus applications. The 16-bit I/O port functionally consists of two 8-bit ports (PORTA and PORTB). The MCP23017 can be configured to operate in 8-bit or 16-bit modes.


To wire your MCP23017 Expander to your Arduino, connect the following pins:

  • Pin 15 (A0) –> Arduino Ground
  • Pin 16 (A1) –> Arduino Ground
  • Pin 17 (A2) –> Arduino Ground
  • Pin 18 (Reset) –> Arduino +5V
  • Pin 19 (Int B) –> N/C
  • Pin 20 (Int A) –> N/C
  • Pin 21 – 28 –> N/C
  • Pin 1 – 8 –> Button Pin(-)
  • Pin 9 (Vdd) –> Arduino +5V
  • Pin 10 (Vss) –> Arduino Ground
  • Pin 11 –> N/C
  • Pin 12 (Scl) –> Arduino Pin A5
  • Pin 13 (Sda) –> Arduino Pin A4
  • Pin 14 –> N/C

Don’t forget to wire all the Ground Pins of each tact to the Arduino Ground via 10Kohm Resistor and all the (+) Pins of each button to +5V.

Recommended Software

  • none

Instructions and Code

Με ετικέτα: , , , , ,
2 comments on “MCP23017 Input Using I2C
  1. Ross says:

    I am having a really hard time getting my mcp23017 to process multiple input buttons. I noticed that the image on this page (input via mcp23017) is the same image on the page that shows output via mcp23017. The code on this page mentions buttons, but there’s only an LED. Am I missing something???

  2. Athanasios Loi says:

    Maybe this tutorial is better
    Be carefull with the Addresses of MCP

Leave a Reply

Your email address will not be published. Required fields are marked *