I'm trying to read voltage values on several channels of the ADC Pi Plus, i'm using the 16 bits resolution, continuous mode, and 1x multiplier. I am using a Raspberry Pi 3 b
I first write into the configuration register, for channel 2 i send :
1011 1000 (0xB8)
according to the datasheet i should be receiving "2 data bytes followed by the configuration byte repeated for each clock sent"
I send a 'read' command specifying that i want 4 bytes returned, the answer is :
0F 52 38 B8
52 38 is the measured voltage
B8 is the command i sent
but what is the '0F' ?? This extra byte is here for every channel, its value is 00 for channel 1 and 3, and 0F for channel 2 and 4.
Now, about the reference voltage. I read in the datasheet that the internal reference voltage is 2.048 V. In order to calculate the voltage measured i arrange the bits to be in the correct order, then :
(value measured) * (( Vref * 2)/ (2^16)) as specified in the datasheet
i end up with a voltage of 0.46V , but measuring with an oscilloscope gives me 0.6V
The card is powered by 5V, is it this value i am supposed to use instead of the internal one ? It gives me results closer to what i was able to measure with the oscilloscope...
Thanks for any help given,