-->
Page 1 of 1

Adc registers?

PostPosted: Mon May 24, 2021 2:15 pm
by pidloop
Hi! I want to read the adc from an interrupt. Tried using the API but the functions are not locked into IRAM. So am looking for doc on the bare-metal registers needed to read adc. Any info appreciated.. thanks,

Re: Adc registers?

PostPosted: Fri Jun 04, 2021 1:37 pm
by eriksl
No sorry, that is not going to happen. The ADC is also used for the WiFi subsystem and that means 1) that you cannot exclusively use it 2) therefore it will never be very accurate and you need to take a lot of samples and average them out and 3) Espressif will never release the bare metal specs of it.

If you really want to do some proper ADC work on the ESP8266, I'd really recommend using an external ADC, connect it either over SPI or I2C whatever you like. For fast/synchronous transfer, you can also use I2S, which the ESP8266 has hardware support for (just like SPI).

Re: Adc registers?

PostPosted: Fri Jun 04, 2021 2:07 pm
by pidloop
I now think you are correct, thanks for taking the time to reply.