Hi little-scale
I looked at the datasheet and I think you have to raise the CS signal after you wrote the command byte and the value for each pot.
Basic operation in write_pots should be
byte write_pots(int potValue11, int potValue12) {
// spi pot chip 1
digitalWrite(SLAVESELECT,LOW); // enable chip 1
// set value for pot A
spi_transfer(cmdWritePot1); // command byte out to select pot and init write
spi_transfer(potValue11); // 8 bit pot value
digitalWrite(SLAVESELECT,HIGH); // load data for pot A into the registers on chip 1
//now do the same for pot B
digitalWrite(SLAVESELECT,LOW); // enable chip 1
// set value for pot B
spi_transfer(cmdWritePot2); // command byte out to select pot and init write
spi_transfer(potValue12); // 8 bit pot value
digitalWrite(SLAVESELECT,HIGH); // load data for pot B into the registers on chip 1
}
Eberhard