The Slice of Pi/O may be configured in 3V3 or 5V modes of operation via a jumper.
Power may be taken from the board on PWR and GND if a suitable 4-pin header is fitted.
sed -i 's/^blacklist/#blacklist/g' /etc/modprobe.d/raspi-blacklist.conf
echo "device_tree_param=i2c1=on" >> /boot/config.txt
echo 'SUBSYSTEM=="i2c-dev", MODE:="0666"' >> /etc/udev/rules.d/10-local.rules echo "options i2c_bcm2708 baudrate=400000" >> /etc/modprobe.d/modprobe.conf echo 'i2c-dev' >> /etc/modules reboot
For the MCP23017 a baudrate of 900000 has been tested and appears to work satisfactorily. You should experiment with this value.
RPi revision | I2C device | Default MCP Address |
---|---|---|
1 | /dev/i2c-0 | 0x20 |
2 | /dev/i2c-1 | 0x20 |
Low Voltage Programming with VPP at 3V3 or 5V
Separate data I/O connections (only supported option)
SLICE OF Pi/O PICMicro ============= ======== PWR-------------------------------VDD GND-------------------------------VSS A0--------------------------------VPP A1--------------------------------PGC A2--------------1000R--------+----PGD | A3---------------------------+ A4--------------------------------PGM (1)
VPP=0 # A0 PGC=1 # A1 PGDO=2 # A2 PGDI=3 # A3 PGM=-1 DEVICE=MCP230XX IFACE=/dev/i2c-1 ADDR=0x20 SLEEP=0 #VPP_RUN + PGD_IN_PULLUP BITRULES=0x1010