I am using a Waveshare A/D board on a Raspberry Pi 3b. This board contains a ADS156 A/D chip. I am writing driver code in Python using a Broadcom C library with bindings to Python. This is NOT a software question as such.
This library does not have a distinct spi_write function, instead it has a spi_transfer function. When this function is called, it asserts CS and clocks an 8 but value out on MOSI (ads1256 DIN) and simultaneously clocks in data from MISO (ads1256 DOUT) thus reading 8 bits of data from the slave.
I believe this is what I need to do in order to read data (one shot mode): When doing a read from the ads1256, (reference fig 30 in datasheet) I wait for DRDY to go low then write a RDATA command to MOSI (DIN) and read the data that returns and that is byte 1, the MS byte. Then I do two additional spi transactions reading the returned data as Middle byte and LS byte.
So my question is, these additional transactions also send data out MOSI. What data should I send? Should I send RDATA (0x01), 0xff, 0x00? Sending nothing is not an option.
I believe that the issue of not having a read only function is common among spi drivers so it must be that the ads1256 is able to ignore these writes but that is speculation.
What are your thoughts in this issue?