Page 1 of 1
ESP32 add AnalogSetAttenuation
Posted: Fri Jul 22, 2022 11:35 am
by stefan.erni
Hi Ben
Is it possible to add a command for all the AD converter from the ESP32 to use analogSetAttenuation?
regards
Stefan
https://espressif-docs.readthedocs-host ... /adc.html#
Analog set:

- AD_2022-07-22_12-27-39.jpg (38.42 KiB) Viewed 2253 times
Re: ESP32 add AnalogSetAttenuation
Posted: Mon Jul 25, 2022 11:30 am
by BenR
Hi Stefan,
Thanks for the suggestion. It was there previously but a bit reduced in terms of functionality and visibility.
I've updated the ESP32 ADC definitions so now it should show the correct max voltage in the Vref property and also catch and implement this in the CAL C code.
Let me know how you get on.
Re: ESP32 add AnalogSetAttenuation
Posted: Mon Jul 25, 2022 2:50 pm
by stefan.erni
Hi Ben
It works with the attenuation settings.
But it is a little confusing what the ESP32 pico delivers.
In order to get to the maximum I have to apply the following voltage:
Vref Vin
950mV 1.1volts
1250mV 1.39 volts
1750mV 1.89 volts
2450mV 3.2 volts
I'm not interested in the small errors at the moment, but why is
for the 2450mV reference 3.2 volts necessary?
But even worse, I should actually have the 3.2 volts, but I have no idea why this is already working...
regards
Stefan