This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

sampling rate in ADC

Hi,

How can i use the processor to trigger the ADC by generate an timer interrupt and sample interval in 100ms. Is there any example that i can refer to? Please advice. Thank you.

  • Hello Jia,

    If the trigger rate is fixed then you can use the timer to trigger the ADC and the ADC conversion interrupt to ask the processor to read the data from the ADC FIFO.

    Regards
    Amit
  • Amit Ashara said:
    If the trigger rate is fixed then you can use the timer to trigger the ADC and the ADC conversion interrupt to ask the processor to read the data from the ADC FIFO.

    Hi Amit,

    I repeated your writing - in it's entirety - because our small, tech group believes it to be, "terrific."  Much power, precision & clarity - in not so many words - Bravo!

    That said - would it not be even more helpful if you'd, "Add to the never-ending, Amit "to do" list" the creation of a similar chart - listing the most, "usual suspects" of ADC triggers - and the resulting, best practice - ADC interrupt handling?   We suspect that there may be "normal/customary" linkages between ADC triggers & linked interrupt handlers - and providing these in one central place would (surely) erase poster's "Reinvention" of the ADC implementation wheel!

    To escape the charge of, "Asking w/out contributing" may I offer this listing of the various, "ADC Conversion Initiating Criteria:"

    Processor
    Comparator (several)
    External
    Timer (several)
    PWM (several)
    Always

    Each of the above may initiate an ADC conversion - user's application determines the best "mating to task."  Note that not all MCUs may include all of the sources listed...

  • Hello cb1

    Yes, that is true. The functional specification chapters of the data sheet more clarity in terms of dedicated application notes of when-what are the best methods.

    Regards
    Amit
  • Hello Amit,

    W/in few minutes I "harvested" the 6 "Initiating Criteria" for ADC conversions - they appear tail end of my earlier posting.
  • Hello cb1

    Thanks for the information. Timer, PWM and to some extent external with a periodic signal may suit the posters requirement

    Regards
    Amit