- Category: Raspberry Pi
- Last Updated on Tuesday, 28 August 2012 10:29
Slice of PI/O is an MCP23017 breakout, adding 16 I/O pins to the Raspberry Pi via the I2C bus.
Each I/O pin is capable of sourcing or sinking 25mA and they are 5v tolerant.
Data-sheet for the MCP23017 chip can be found here.
Special mention should go to Nathan for coming up with the original idea, see his blog post here
Silk Screen Error
There was a mistake on the silk screen for the first batch of boards. Port B is numbered incorrectly.
The port number should from top to bottom read A0->A7 then B7->B0
The slice of PI/O has 3 power options 3v3, 5v or external. Use the red jumper to select between 3v3 and 5v direct from the Raspberry Pi's GPIO headers or remove the jumper and wire a power source to the "EXT POWER" pad.
Two Interrupt Pins A & B have been broken out to pads, these can be wired back the Raspberry Pi's normal GPIO's.
Interrupts can be configured to trigger on input pin changes, for more info please refer to the MCP23017 data-sheet.
On the underside of the PI/O there are 6 solder pads used for the 3 address selection pins on the MPC23017.
You need to tie the 3 pins either high(to PWR) or low(to GND) in order to select the I2C address,
Soldering all 3 pins low as shown will give an address of 0x20. More details can be found in the MCP23017 data-sheet
There are an optional 4 pads to allow extenion of the I2C bus, this could allow daisy chaining of multiple MCP23017 or any other I2C device
Parts laid Out
Solder the IC Socket
Solder the IO and GND headers
Solder the capacitor and jumper
Solder the Raspberry Pi GPIO header to the other side of the board
Add the required power jumper and go
Using the latest Raspbian image is recommended as it already has I2C support built into the kernel and just needs the i2c enabling and i2c-tools installing before you can start playing.
Enable i2c by editing the following files
Comment out the line
Add a new line
Installing i2c-tools requires two commands, replace 'your-userid' with your login name (the default is pi)
$ sudo apt-get install i2c-tools $ sudo adduser your-userid i2c
Once everything is installed and rebooted, you should be able to detect the MCP23017 using the following command.
$ i2cdetect -y 0
It should show up on the address you selected