PiFace Digital 2 – I/O udvidelse





Piface ia designed for Raspberry Pi, but it can be used to other processor-cards like Arduino as-well.
The interface is SPI, see the table below "Raspberry pins used by Piface module" for details

This example is in language C++. You can see some Python examples in the Gettings started document.

Install wiringpi

Commandline tools

C++ test program

Build


Pins on the PiFace are 200 through 207 for both reading and writing,
with pins 208 through 215 reading the state of the output latch register (ie. you can read the state of the output pins)

Outputs:
InputAddressNotes
0200Relay-0
1201Relay-1
2202
3203
4204
5205
6206
7207

Output latch register :
InputAddressNotes
0208Relay-0
1209Relay-1
2210
3211
4212
5213
6214
7215

Inputs:
InputAddressNotes
0200S0
1201S1
2202S2
3203S3
4204
5205
6206
7207

Hardware




Download Getting started document

Download MCP23S1 datablad

Køb Piface



Jumpers



Pinout:


Raspberry pins used by piface module
SignalRapberry BenRaspberry GPIOBeskrivelse
VCC2NA5V supply
GND6NAGND
CE02410Chip select
MOSI1912Master out slave in
MISO2113Master in slave out
SCLK2314Clock