<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ADC conversion on multiple inputs in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-conversion-on-multiple-inputs/m-p/691708#M42609</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to modify the ADC_demo example supply on IAR with my Kinetis K60.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to modify it to be able to read multple analog inputs.Here is the interrupt in the program:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt; /****************************************************************************** * adc0_isr(void) * * use to signal ADC0 end of conversion * In: n/a * Out: n/a ******************************************************************************/ void adc0_isr(void) { if (( ADC0_SC1A &amp;amp; ADC_SC1_COCO_MASK ) == ADC_SC1_COCO_MASK) { // check which of the two conversions just triggered PIN1_HIGH // do this asap result0A = ADC0_RA; // this will clear the COCO bit that is also the interrupt flag cycle_flags |= ADC0A_DONE ; // mark this step done } else if (( ADC0_SC1B &amp;amp; ADC_SC1_COCO_MASK ) == ADC_SC1_COCO_MASK) { PIN1_LOW result0B = ADC0_RB; cycle_flags |= ADC0B_DONE ; } return; }&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;Is it possible in that interrupt to switch the input target to convert?&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;For example I start with ADC0, once the conversion is finish, I continue with the ADC1 and so on.&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Jul 2017 18:57:44 GMT</pubDate>
    <dc:creator>xavierbuhot1235</dc:creator>
    <dc:date>2017-07-10T18:57:44Z</dc:date>
    <item>
      <title>ADC conversion on multiple inputs</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-conversion-on-multiple-inputs/m-p/691708#M42609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to modify the ADC_demo example supply on IAR with my Kinetis K60.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to modify it to be able to read multple analog inputs.Here is the interrupt in the program:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt; /****************************************************************************** * adc0_isr(void) * * use to signal ADC0 end of conversion * In: n/a * Out: n/a ******************************************************************************/ void adc0_isr(void) { if (( ADC0_SC1A &amp;amp; ADC_SC1_COCO_MASK ) == ADC_SC1_COCO_MASK) { // check which of the two conversions just triggered PIN1_HIGH // do this asap result0A = ADC0_RA; // this will clear the COCO bit that is also the interrupt flag cycle_flags |= ADC0A_DONE ; // mark this step done } else if (( ADC0_SC1B &amp;amp; ADC_SC1_COCO_MASK ) == ADC_SC1_COCO_MASK) { PIN1_LOW result0B = ADC0_RB; cycle_flags |= ADC0B_DONE ; } return; }&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;Is it possible in that interrupt to switch the input target to convert?&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;For example I start with ADC0, once the conversion is finish, I continue with the ADC1 and so on.&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jul 2017 18:57:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-conversion-on-multiple-inputs/m-p/691708#M42609</guid>
      <dc:creator>xavierbuhot1235</dc:creator>
      <dc:date>2017-07-10T18:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: ADC conversion on multiple inputs</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-conversion-on-multiple-inputs/m-p/691709#M42610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think customer can software trigger ADC1 module at ADC0 interrupt service routine.&lt;/P&gt;&lt;P&gt;Thank you for the attention.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ma Hui&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jul 2017 05:51:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-conversion-on-multiple-inputs/m-p/691709#M42610</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2017-07-11T05:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: ADC conversion on multiple inputs</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-conversion-on-multiple-inputs/m-p/691710#M42611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In fact I made a mistake.&lt;/P&gt;&lt;P&gt;I want to change the channel after each convertion.&lt;/P&gt;&lt;P&gt;Is there posible to stop the conversion on a channel in the interrupt and swap to an other channel?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jul 2017 07:20:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-conversion-on-multiple-inputs/m-p/691710#M42611</guid>
      <dc:creator>xavierbuhot1235</dc:creator>
      <dc:date>2017-07-11T07:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: ADC conversion on multiple inputs</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-conversion-on-multiple-inputs/m-p/691711#M42612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I try the code on my TWR kit k60 512. I decrease the prescaler to reduce the conversion time. &lt;/P&gt;&lt;P&gt;I should have more than 10K conversion per second but I can't go above 700 conversion per second.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What should be the maximum number of conversion per second&amp;nbsp; on my kit?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jul 2017 18:17:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-conversion-on-multiple-inputs/m-p/691711#M42612</guid>
      <dc:creator>xavierbuhot1235</dc:creator>
      <dc:date>2017-07-11T18:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: ADC conversion on multiple inputs</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-conversion-on-multiple-inputs/m-p/691712#M42613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check the ADC conversion speed below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/25391i38D6DB15F20D7CF3/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/25438i1BD6FB802FB9D5B1/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If customer consider to use ADC interrupt mode and in interrupt service routine software trigger ADC conversion, the ADC conversion rate also need to consider the ADC ISR execute time.&lt;/P&gt;&lt;P&gt;There is an application note &lt;A href="http://www.nxp.com/docs/en/application-note/AN4590.pdf"&gt;AN4590&lt;/A&gt; using DMA to emulate ADC flexible scan mode and &lt;A href="http://www.nxp.com/docs/en/application-note-software/AN4590SW.zip"&gt;AN4590SW&lt;/A&gt; is the related software.&lt;/P&gt;&lt;P&gt;Wish it helps.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ma Hui&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 01:58:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-conversion-on-multiple-inputs/m-p/691712#M42613</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2017-07-12T01:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: ADC conversion on multiple inputs</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-conversion-on-multiple-inputs/m-p/691713#M42614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where could I find these tables? I cannot find it in the reference manual.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 07:51:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-conversion-on-multiple-inputs/m-p/691713#M42614</guid>
      <dc:creator>xavierbuhot1235</dc:creator>
      <dc:date>2017-07-12T07:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: ADC conversion on multiple inputs</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-conversion-on-multiple-inputs/m-p/691714#M42615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Those tables are located in &lt;A href="http://www.nxp.com/docs/en/data-sheet/K60P144M100SF2V2.pdf"&gt;K60 datasheet&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ma Hui&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jul 2017 08:21:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-conversion-on-multiple-inputs/m-p/691714#M42615</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2017-07-13T08:21:15Z</dc:date>
    </item>
  </channel>
</rss>

