-
Hi, all
In my real test, only ADC0_12, ADC0_8 and ADC0_1 can get positive result. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @MarsMSWu , Can you try that sample and see how it compares for you? Let us know what you find. The console output:
|
Beta Was this translation helpful? Give feedback.
Hi @DerekSnell ,
It 's very thanks for your feedback.
I think maybe is wrong data type then also get a incorrect result.
We use a integer type to get the data and put to unsigned integer type and conversion to mV.
I don't know why buf data is negative...then if assign to unsigned integer type will get a huge and incorrect result.
If we use unsigned integer data type for buf then can get correcr result.
Because that channel is using external pull-hi 3.3V so print the value in console is 65xxx, it meet our expected in early study.
The value 65xxx show on console should be mV data type which conversion by API function "adc_raw_to_millivolts_dt".
Thanks.