MCP23017 is the I/O port extender that runs on 12C. It is 16-bit I/O expender.in this tutorial we are going to interface the single and multiple mcp23017 with arduino.
fig:- mcp32017 module |
IT has 16 I/O ports from PA0 to PA7 and PB0 to PB7.
first of all we are going to interface the single mcp23017 with Arduino. For this connect the circuit as shown on figure. Download the library for mcp23017 from sketch-- include library -- manage libraries.
fig- interfacing mcp23017 with arduino |
Clickhere to get code
To interface the multiple I2C we need to vary the address of each. Mcp23017 has three address pins i.e A0,A1 and A2. so, we can used up to 8 mcp23017 on single arduino by varying the address pins.
fig-multiple mcp23017 interface with arduino |
clickhere to get the code