Receiving more than one byte as response from SPI

Hi,

send your 8 bit command

Spi.transfer(CS_pin, command, SPI_CONTINUE);

and then for every byte (n) you want to read an other

byte_1 = SPI.transfer(CS_pin, 0x00, SPI_CONTINUE);
byte_2 = SPI.transfer(CS_pin, 0x00, SPI_CONTINUE);
...
byte_n = SPI.transfer(CS_pin, 0x00);

not tested, but with SPI diagram on page 17, it should work :slight_smile:
http://datasheets.maximintegrated.com/en/ds/MAX11040K-MAX11060.pdf

if you want to write more than one byte it works the same

I use it this way for 8/16/32 bit read & writes to AD5666 / MCP4261 and it works fine (if only one CS is used in the sketch).
[edit]Multiple usage of the predefined CS work now!
see [solved] due extended SPI problem - Arduino Due - Arduino Forum

background:
with SPI_Continue the CS_pin keeps low
and every other transfer 8 bits of MISO are clocked in
so for your SPI slave it looks like one big command comming in
the last SPI.transfer without SPI_CONTINUE let the CS_pin go to high again.