Hendrik, the way Matt has implemented reads should work fine. A read cycle for the part is started by a h/l transition on CS, with 32 bits transfered, the previous cycles result is returned, the first 8 bits set the mode for the next conversion.
The first time the device is accessed, there is no valid data to read so just writing the first byte as 0xB0 will start a new conversion.
If you were using multiple channels you would parse that information out of the lower 6 bits of the result but as Matt is only reading one channel that was not needed so he just masks off the upper 3 bits and lower 6 bits.
Hello
I am trying to code up a simple test on an LTC2418 ADC. This chip uses SPI to read up to 16 Single ended signals. I cannot seem to get correct output from my SPI calls. I would really be grateful if someone could take a look and give feedback.
Datasheet here http://cds.linear.com/docs/Datasheet/241418fa.pdf
Basically you send it an 8bit command to select single ended and the channel and read the 32bit result. Do some massaging of the 32bits and get a result. My results make no sense and changing the input voltage causes erratic changes in result.
I believe the SPI mode is 8,0 but not 100% sure of that.