ADC sample rate

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Is there a way to capture more than one ADC measurement per fine interval? I've looked at all the ADC discussions, and apparently there is no way to execute code any more often than the fine timeout will allow, which is every 12 (or is it 12.5?) ms, which is about 80 times a second.

If that is true, then I wonder if there is a way to get more than one ADC reading in the fine timeout? The documentation only mentions adc_readVoltage and adc_readSampleRaw, but the problem with them is that, as far as I understand, they can only get ADC reading as of the moment they are executed. Are there functions that allow us to capture ADC readings that had been happening between fine timeouts? I don't need to process each ADC reading the moment it's available, but I would like to capture and process more than 80 readings per second.

0 Likes
1 Reply
JacobT_81
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

This is correct, we only have the ability to take one shot measurements with the ADC--no DMA or FIFO on the hardware block.

So it comes down to how fast you can sample ADC at the application level. If you run the hardware timer instead of the fine timer, you will be able to poll at a much higher rate. See: How to Implement the HW Timer

This will be a matter of trial and error. Polling the ADC is not a fast process and attempting to do it too often may crash your application. You may need to play around with the numbers and find a stable number.

Jacob