Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By HolgerW
#10489 Hi,
i use a 9.2 SDK with the AT demo and that extra adc.c file.
I can read http requests sucessfull, read there the ADC with read_adc(); and can give it out as response.

Hardware is a potentiometer on a 1V voltage divider from stable 3,3V and a 100nF capcity on TOUT pin.
The values i have read in the request are stable, only last digit changed (normal).
Now i want to read the adc in a timer interrupt.
I created a 5 sec timer (tested with LED) and read there the ADC with same command.
Now i get very different values back for the same call, eg. the value is 111 i get 94, 284, some times 111...
Receiver value is a volatile uint16.

I have tried the routine from pvvx here in forum, but i got always zero back zero. Be honest, i didnt understood what happen in that routine.

In user_interface.h is a function system_read_adc() but i cant compile that without error (reference failed)

Any ideas whats wrong, what i can do ?

Thanks

Holger