Arduino DUE SPI via PCA9534

I need to control 5 devices with the Arduino Due via SPI. I know what Due have only 3 SS pins to choose from. 4, 10 and 52.
I try to go the other way. I took the port extender PCA9534 and try to use its ports as a CS for my SPI devices. I do not use standard CS pins.
In the transfer, I set the PCA9534 pin to the LOW and rise it back to HIGH after transmission. I thought it was not important that SPI lib do with standart CS pin, it is important that the pin on the slave device is LOW and then the transfer will be normal.

But what goes wrong (((

pin_Write(ADDR_CS, &_port_CS_Out, 2, LOW); // set PCA9534 pin to low
SPI.transfer(vol); // spi transfer
pin_Write(ADDR_CS, &_port_CS_Out, 2, HIGH); // set PCA9534 pin to high

need help...

That code is just an excerpt, please post the complete sketch that shows the problem. I guess you haven't initialized the SPI channel (#3 in your case).

RogerRU:
I need to control 5 devices with the Arduino Due via SPI. I know what Due have only 3 SS pins to choose from. 4, 10 and 52.

So as your using the SPI library in master mode, any pin can be used as select for the SPI device.

So as your using the SPI library in master mode, any pin can be used as select for the SPI device.

That's true for an AVR Arduino but the Due is based on a 32bit ARM processor which has SPI channels. The SPI channel has to be initialized but srnet explains you can control the CS pin yourself once you have the SPI channel.