1 Reply Latest reply on Jun 29, 2016 11:58 AM by JacobT_81

    ADC sample rate

    filipp.shpomer_1849816

      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.

        • 1. Re: ADC sample rate
          JacobT_81

          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

          3 of 3 people found this helpful