element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Simple+cheap I/O expansion with MCP23017
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 10 replies
  • Subscribers 679 subscribers
  • Views 2923 views
  • Users 0 members are here
Related

Simple+cheap I/O expansion with MCP23017

morgaine
morgaine over 13 years ago

I stumbled across this simple little Pi project at SK Pang in the UK, one step up from blinking a single LED --- blinking a large row of them with patterns of your choice, aided by Microchip's MCP23017 I/O expander  --- http://www.skpang.co.uk/blog/archives/454

 

Although very simple, I think it might be worth highlighting as another step on the learning path for budding hardware engineers, particularly given that the MCP23017 costs under one pound from Farnell --- http://uk.farnell.com/microchip/mcp23017-e-sp/16bit-expander-i-o-i2c-i-f-dip28/dp/1332088 .  SK Pang are bundling that chip in a "Starter Kit for Pi" together with their Pi cover, breadboard, LEDs etc, which may be convenient if you need a breadboard or cover anyway --- http://www.skpang.co.uk/catalog/starter-kit-for-raspberry-pi-b-p-1107.html

 

See Nathan Chantrell's site --- http://nathan.chantrell.net/ --- for full details of software and hardware aspects of the project, including variations such as building on top of the well known Slice of Pi expansion board.  Direct article links ---  http://nathan.chantrell.net/20120519/raspberry-pi-and-the-mcp23017-i2c-io-expander/ , http://nathan.chantrell.net/20120524/python-tools-for-the-mcp23017-io-expander/ , http://nathan.chantrell.net/20120602/raspberry-pi-io-expander-board/ .  And finally, Nathan's article about interfacing the Pi's 3.3V I/Os with the 5V MCP23017 device is important educational reading --- http://nathan.chantrell.net/20120610/raspberry-pi-and-i2c-devices-of-different-voltage/ .

 

At the MCP23017's very low price, this project can be expanded a lot further easily, as 3 address pins allow you to directly address up to 8 of these devices on the I2C bus.  There is also a version of the chip for the SPI bus, MCP23S17 --- http://uk.farnell.com/microchip/mcp23s17-e-sp/ic-16bit-i-o-expander-spi-23s17/dp/1292238 , and you could in principle use 8 devices on each I/O bus if you have a truly demonic project.

 

The datasheet for MCP23017/MCP23S17 is available at http://www.farnell.com/datasheets/12170.pdf .

 

The Pi certainly has rather limited hardware I/O capability, but that's no deterrant for those who want more simple I/Os. image

 

Morgaine.

  • Sign in to reply
  • Cancel
Parents
  • jamodio
    jamodio over 13 years ago

    I had a great experience using the Microchip GPIO extenders, they work really well, you can chose a part with I2C or SPI support, and on SPI mode

    you can even share the SPI bus with multiple GPIO extenders sharing also the CS signal for all of them.

     

    I've a pair of boards, one has a PIC32MX with four 8-bit GPIO extenders (shown in the picture) and the other one is an expansion to this one with

    another four 16 bit GPIO extenders. Highly recommendable part, requires a little bit of programming but the work really well.

     

    image

    -J

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • jamodio
    jamodio over 13 years ago

    I had a great experience using the Microchip GPIO extenders, they work really well, you can chose a part with I2C or SPI support, and on SPI mode

    you can even share the SPI bus with multiple GPIO extenders sharing also the CS signal for all of them.

     

    I've a pair of boards, one has a PIC32MX with four 8-bit GPIO extenders (shown in the picture) and the other one is an expansion to this one with

    another four 16 bit GPIO extenders. Highly recommendable part, requires a little bit of programming but the work really well.

     

    image

    -J

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube