Hi everyone,
I created small project based on ESP32 platform and Dallas DS2450 ADC Ic. I have big problem when I want to chage resolution of ADC converter. I can not change resolution from 8 bit to highter. I use Arduino libraries from link below:
I found on Internet only information that I should change macro: #define DS2450_8_BIT_RESOLUTION 0x08
to one of below: #define DS2450_12_BIT_RESOLUTION 0x0C #define DS2450_16_BIT_RESOLUTION 0x10
I found on Internet only information that I should change macro: #define DS2450_8_BIT_RESOLUTION 0x08
to one of below: #define DS2450_12_BIT_RESOLUTION 0x0C #define DS2450_16_BIT_RESOLUTION 0x10
Hi,
thank you for reply. Of course I changed it on begin() methon, but without success. Both options are not working - for 12 and 16 bits resoluton too.
You'll have to update the update method to actually use more than one byte per channel too.
That library tries to be too clever and interpret the values from the chip as voltages for you - that's
not helpful, it should return the raw bits, your sketch can decide what they mean...
What's worse that library uses floats, so it will be very slow.
OK I analyzed code one more time and now I see where is the problem from. It divided value form table (data[4], data[6] ect.) by 50, and using that we always will have resolution 20 mV, regardless of adc resolution.
Do you have any idea what should I change? I am unfortunately not expert in Arduino.
And secondly - what library should use instead floats?