Using 2 SPI devices

I'm trying to write a sketch that uses an adafruit ble nrf8001 breakout for data input from my iphone and output to a MCP4261 pot chip using an Arduino Uno. I can get the adafruit / Uno communication working and the Uno / MCP chip working but I don't how to assign the 2 different pins for SS.

I'm could use some help with an example of a sketch that using 2 SS pins, one for input and one for output.

I'd really appreciate an example. Thanks


byte ssPin1 = 9;
byte ssPin2 = 10;

pinMode (ssPin1, OUTPUT);
pinMode (ssPin2, OUTPUT);

Physically, make take more effort to connect the actual pins being used.

Tutorial: Arduino and the SPI bus

Nick Gammon on SPI and Arduino

If you have an AVR with an open serial port, you can run master-mode SPI on that as Nick shows how.
Find USART on his blog page there, subtitle is SPI from the USART ... an alternative

When you have dedicated SPI bus for a single device or chain of devices, you only have to init once and you don't need an extra select pin, just ground select on the device. It does mean a few extra lines of code which Nick gives there.

Crossroads, that means the 1284P and the Bobduinos can be USB connected and still provide two SPI buses. It should be possible to transfer high speed data coming in on one right out to the other. The simple example would be an SD to SD file copier, the transfer would be at least twice as fast as with 2 SD's on the same bus.