Slide Lab 3
Slide Lab 3
I2C Communication
FSB30103
EMBEDDED SYSTEM TECHNOLOGY
NAME ID
Void loop ()
mcp.digitalWrite (…) and mcp.digitalRead (…) – sets
and reads the current state of a specific pins on the
MCP23017
Complete Code Implementation
Testing and Simulation
The motors, left button, right button and TC74 functions properly
It demonstrates the successful application of the I2C application in code
Right Left
TC74 button button
MCP23017 Overview
The MCP23017 has three address pins (A0, A1, A2) that allow the user to set the I2C address
of the device
These pins determine the last three bits of the device’s 7-bit I2C address. By connecting each
pin to either GND (0) or VCC (1), the address can be configured which provides 8 unique
addresess from 0X20 to 0X27
16 additional digital I/O pins are provided, and it divided into two 8-pin banks (PORTA and
PORTB). The pins can be configured individually as input or output
It communicates with Arduino via I2C protocol by using only SDA and SCL pins
It also allows control of more devices such as sensors, buttons or motors which increases
system flexibilty