If connect a sensor to one of the ADC channal , the sensor's max voltage is 5V. From my understanding, In project' code, voltage=(CDATA/ 4095)*5.0 ,is that right?
Hello,
Yes, that is correct for 12 bit ADC.
CDATA * 5 / 4095
https://www.youtube.com/watch?v=k5oMLvDKJL4&ab_channel=Electrofun
Best regards
Peter