Here is my C code for a 16bit SPI interface on an Atmel ATMega8 processor. This is not using the Arduino system. SPI is not that hard!
#define VCA_DATA 2 // PORT D1
#define VCA_CLK 4 // PORT D2
#define VCA_CS 32 // PORT C5
vca_out(unsigned char n) // n = 8bit value to send
{
unsigned int q,r;
r= ((n << 8) + n); // both channels same
PORTC &= ~(32); // vca chip select
for (q= 0x8000; q>= 1; q/= 2) {
if (r & q)
PORTD |= (VCA_DATA);
else
PORTD &= ~(VCA_DATA);
PORTD |= (VCA_CLK);
PORTD &= ~(VCA_CLK);
}
PORTC |= 32; // vca chip unselect
return;
}