Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rm-hull/mcp23017
Schematics and build info for assembling a Raspberry Pi breakout board with multiple MCP23017 input/output port expanders
https://github.com/rm-hull/mcp23017
Last synced: about 1 month ago
JSON representation
Schematics and build info for assembling a Raspberry Pi breakout board with multiple MCP23017 input/output port expanders
- Host: GitHub
- URL: https://github.com/rm-hull/mcp23017
- Owner: rm-hull
- Created: 2013-02-16T14:31:45.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-01-01T15:09:27.000Z (almost 11 years ago)
- Last Synced: 2024-10-03T12:17:45.110Z (about 2 months ago)
- Language: Python
- Homepage:
- Size: 1.88 MB
- Stars: 3
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
mcp23017
========Schematics and build info for assembling multiple MCP23017 input/output port
expanders with bi-directional level shifters and selectable power source
(Internal 3V3, 5V, External 5V), as below.![Level shifter](https://raw.github.com/rm-hull/mcp23017/master/doc/level-shifter.jpg) [Attribution unknown]
Further technical details for the MCP23017 expander can be found in the
[datasheet](https://raw.github.com/rm-hull/mcp23017/master/doc/MCP23017%20datasheet.pdf) [PDF].Schematic
---------
![Stripboad Layout](https://raw.github.com/rm-hull/mcp23017/master/doc/schematic_bb.png)Installation
------------
Edit `/etc/modules` and add the following entries:i2c-bcm2708
i2c-devand reboot. Alternatively, modprobe them in. Either way, confirm the driver
has loaded properly:$ dmesg | grep i2c
[ 18.310467] bcm2708_i2c bcm2708_i2c.0: BSC0 Controller at 0x20205000 (irq 79) (baudrate 100k)
[ 18.332292] bcm2708_i2c bcm2708_i2c.1: BSC1 Controller at 0x20804000 (irq 79) (baudrate 100k)
[ 18.480593] i2c /dev entries driverThen add your user to the i2c group:
$ sudo adduser pi i2c
Install some packages:
$ sudo apt-get install i2c-tools python-smbus
Check to see if the chip has registered (revision 2 RPi's should use icbus
1, whereas earlier revisions use 0):$ i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --TODO
----
* Expand documentation* Example programs
References
----------
* http://nathan.chantrell.net/20120602/raspberry-pi-io-expander-board/* http://www.bootc.net/archives/2012/05/19/i2c-and-the-raspberry-pi/
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rm-hull/mcp23017/trend.png)](https://bitdeli.com/free "Bitdeli Badge")