There's an SPI example on the meLabs web site.