I am trying to read the ADC value from the Colibri iMX6DL with evaluation board but the ADC value seems to differ quite a lot.
However, the Toradex libraries’ Adc_Read() function actually returns the ADC value in Micro Volts, which aligns perfectly with the results of Toradex CE Libraries (toradexcelibraries_2.6-20230327) sample code for ADC.
How to read the absolute ADC value directly from the ADC registers?
Hi @Siva1985 ,
ADC libraray is designed to give you values in volts. Stmpe811 is available on module and is connected via i2c to the imx6 SOC. So. you need to write a code which reads the Stmpe811 register using i2c
Could you please explain why you need absolute ADC values instead of the real voltage in millivolts? As @sahil.tx explained, it is possible, but it requires some non-trivial extra effort. But you can just convert values in millivolts returned by library to ADC register value using next formula:
ADC_register_Value=( Voltage_in_mV / 33000) *4096
Thanks for your support. I will use this formula.
Currently we’re working on a project to migrate from the Colibri T20 to the Colibri iMX6DL due to the planned obsolescence of the T20 which is coming in 2025.
For all the calibration and calculation based on the RAW ADC value In my older Colibri T20 project. That is the reason we need a RAW ADC value from the Colibri iMX6DL module.