It's a 12-Bit, 8-Channel Serial Output Sampling ADC.
From the datahseet, I see it uses SPI protocol, but I'm not being able to get data back from the device.
Is the SCLK compatible with the readings sample?
Anybody can help with some code to read channels CH0~CH7 in Single Ended mode and no Power Down between conversions ? (pg 11 on datasheet explains the values to be sent)
I need to display the data in the Serial monitor as well...
If it doesn't work first time, there could be a bus speed challenge. It appears that 5MHz is about as fast as this device will work, and the SPI bus is default at 4MHz. You might need to slow it down a bit. This will set the SPI bus to 2MHz.
Apparently it's working!
Here is a picture of the Serial Monitor.
Although I don't really understand what I'm reading.
For example: I have an accelerometer in CH4. When the sensor is laying on my desk, I get 1.56 V out of it.
That voltage goes to the ADC that is working with a 3.25 Vref. That means that for 0V it has to send back 0 and for 3.25V (in the channels input) 4096, correct ?
Well, for 1.56V I should get something around 1825 from the ADC.
What exactly is being displayed in the Serial monitor ? I don't see any relations between the values.
It appears it is reading the ADs ok. Now you need to translate that from 2 bytes to one integer. The timing schematic is a bit vague on the timing of the data. It is a 12 bit AD, so result[0] should have the upper 7 bits, and result [1] should have the lower 5 bits.
I would combine them into an integer and shift the whole thing right 3 bits. Something like this?