3 Replies Latest reply on Jul 17, 2017 1:34 PM by user_1377889

    Setting Up and Using ADC for CYBLE-222014-01

    ted_1467596

      I've got a Sequencing SAR ADC (ADC_SAR_Seq_1) in my project and I want to read 2 channels, Vbatt and a mic level input.  The mic level needs to be read 250 SPS and Vbatt maybe 2 SPS.  This is a super low-power project so any chance to save power will need to be taken.  I do have a timer interrupt system set up that is called 250 times per second that I could use to trigger a conversion.

         

      At first I thought I'd make my ADC Free Running and live with the fact that the Vbatt input would be way oversampled but the minimum clock frequency of 1000 kHz gives a SPS of 1557 so I gave up on that and set it to Hardware trigger.  Reading the DS, I can see that I can start a sample by ADC_StartConvert() but it's not clear how I select which channel to convert as there doesn't seem to be an ADC_SelectChannel() command.

         

      Have I missed something in that I may still be able to free run at 250 SPS?  If not, how can I select which channel gets converted?  What's the best way to save power between conversions?