This website is using cookies
We use cookies to offer you the best service possible. If you continue browsing this website you consent to our usage of cookies.
×

Call Us for free +371 2633 11 44

Factory express
0 Items
Shopping Cart
0 Items
×
 x 

0 Items

All categories

PDFPrint

MCP23017-E/SP DIP28 16-Bit I/O Expander with I2C Interface

MCP23017-E/SP DIP28 16-Bit I/O Expander with I2C Interface

1,50 €
1,50 €
1-4w.gif
Description

MCP23017-E/SP DIP28 16-Bit I/O Expander with I2C Interface 

 

16-bit I/O Port Expander MCP23017 (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

We also have the SPI version of this chip here MCP23S17

MCP23017 Features

  • 16-bit remote bidirectional I/O port
    - I/O pins default to input
  • • High-speed I2C™ interface (MCP23017)
    - 100 kHz
    - 400 kHz
    - 1.7MHz
  • Three hardware address pins to allow up to eight devices on the bus
  • Operating Voltage: 1.8V to 5.5V

MCP23017 Pinout

Example Arduino Code

Here is a simple Arduino 1.0 example sketch to flash an LED connected to any pin on Port B

/*
** MCP23017 16 bit Port Expander
** Example code to flash LED on GPB0
** Created 06 Aug 2012
**
** This example code is in the public domain.
** www.hobbytronics.co.uk
*/

#include 

const byte  mcp_address=0x20;      // I2C Address of MCP23017 Chip
const byte  GPIOA=0x12;            // Register Address of Port A
const byte  GPIOB=0x13;            // Register Address of Port B

void setup()
{
  //Send settings to MCP device
  Wire.begin();              // join i2c bus (address optional for master)

  // IOCON.BANK defaults to 0 which is what we want.
  // So we are using Table 1-4 on page 9 of datasheet
  
  Wire.beginTransmission(mcp_address);
  Wire.write((byte)0x00); // IODIRA register
  Wire.write((byte)0x00); // set all of bank A to outputs
  Wire.write((byte)0x00); // set all of bank B to outputs 
  Wire.endTransmission();
  
}

void loop()
{
  Wire.beginTransmission(mcp_address);
  Wire.write(GPIOB);      // address bank B
  Wire.write((byte)0xFF);  // value to send - all HIGH
  Wire.endTransmission();
  
  delay(500);

  Wire.beginTransmission(mcp_address);
  Wire.write(GPIOB);    // address bank B
  Wire.write((byte)0x00);  // value to send - all LOW
  Wire.endTransmission();
  
  delay(500);
}

 

Reviews

There are yet no reviews for this product.
×

Get our best deal on:

Arduino compatible Mega2560 + WiFi R3 ATmega2560+ESP8266 32Mb memory USB-TTL CH340G

16,93 € (Inc. 21% VAT)

FIND OUT MORE BUY TODAY!


TOP