<?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 Re: any example code there for diffferential mode adc in frdm-k64? in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/any-example-code-there-for-diffferential-mode-adc-in-frdm-k64/m-p/867564#M51769</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;For differential mode you just need to set ADC_SC1A_DIFF in addition to the channel reference in ADCx_SC1A.&lt;/P&gt;&lt;P&gt;However differential input between ADC0_DM0 and ADC1_DM3 pin is not possible - it can only be between &lt;BR /&gt;ADC0_DM0 and ADC0_DP0&lt;BR /&gt;or&lt;BR /&gt;ADC1_DM3/ADC1_DP3&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Complete Kinetis solutions, training and support: &lt;A href="http://www.utasker.com/kinetis.html" target="test_blank"&gt;http://www.utasker.com/kinetis.html&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Mar 2019 16:35:57 GMT</pubDate>
    <dc:creator>mjbcswitzerland</dc:creator>
    <dc:date>2019-03-05T16:35:57Z</dc:date>
    <item>
      <title>any example code there for diffferential mode adc in frdm-k64?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/any-example-code-there-for-diffferential-mode-adc-in-frdm-k64/m-p/867563#M51768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;I'm using frdm-k64 board.i want to read adc input from ADC0_DM0/ADC1_DM3 pin.&lt;/P&gt;&lt;P&gt;is there any example code for the diffential mode analog reading?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Mar 2019 09:57:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/any-example-code-there-for-diffferential-mode-adc-in-frdm-k64/m-p/867563#M51768</guid>
      <dc:creator>vimalprasath</dc:creator>
      <dc:date>2019-03-05T09:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: any example code there for diffferential mode adc in frdm-k64?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/any-example-code-there-for-diffferential-mode-adc-in-frdm-k64/m-p/867564#M51769</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;For differential mode you just need to set ADC_SC1A_DIFF in addition to the channel reference in ADCx_SC1A.&lt;/P&gt;&lt;P&gt;However differential input between ADC0_DM0 and ADC1_DM3 pin is not possible - it can only be between &lt;BR /&gt;ADC0_DM0 and ADC0_DP0&lt;BR /&gt;or&lt;BR /&gt;ADC1_DM3/ADC1_DP3&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Complete Kinetis solutions, training and support: &lt;A href="http://www.utasker.com/kinetis.html" target="test_blank"&gt;http://www.utasker.com/kinetis.html&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Mar 2019 16:35:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/any-example-code-there-for-diffferential-mode-adc-in-frdm-k64/m-p/867564#M51769</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2019-03-05T16:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: any example code there for diffferential mode adc in frdm-k64?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/any-example-code-there-for-diffferential-mode-adc-in-frdm-k64/m-p/867565#M51770</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;Unfortunately, there is no driver example for the K64 with ADC differential mode. However, you could use the SDK driver example called "adc16_interrupt" and modify it so it can have the differential mode; for that you just have to change the ADC0 channel to the one corresponding to the ADC0_DM0 &amp;amp; ADC0_DP0 (Channel 0):&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="property macro token"&gt;#define DEMO_ADC16_USER_CHANNEL 0U &lt;/SPAN&gt;&lt;SPAN class="comment token"&gt;/* ADC0_DM0 / DP0 */&lt;/SPAN&gt;‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, as Mark just said in his answer, you also have to set the ADC_SC1A_DIFF; for that, in the same driver example just set to true the "enableDifferentialConversion" from the channel configuration:&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="property macro token"&gt;#if defined(FSL_FEATURE_ADC16_HAS_DIFF_MODE) &amp;amp;&amp;amp; FSL_FEATURE_ADC16_HAS_DIFF_MODE&lt;/SPAN&gt;
    adc16ChannelConfigStruct&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;enableDifferentialConversion &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; true&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="property macro token"&gt;#endif &lt;/SPAN&gt;&lt;SPAN class="comment token"&gt;/* FSL_FEATURE_ADC16_HAS_DIFF_MODE */&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to check if this works, check the ADC0_DM0 and ADC0_DP0 from the FRDM-K64:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;IMG alt="pastedImage_2.png" src="https://community.nxp.com/t5/image/serverpage/image-id/79319i7EB979F8BAFE6D7E/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_2.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this information can help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ricardo Delsordo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 14:17:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/any-example-code-there-for-diffferential-mode-adc-in-frdm-k64/m-p/867565#M51770</guid>
      <dc:creator>nxf51211</dc:creator>
      <dc:date>2020-11-02T14:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: any example code there for diffferential mode adc in frdm-k64?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/any-example-code-there-for-diffferential-mode-adc-in-frdm-k64/m-p/867566#M51771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Differential mode works from (1^N-1) /2 , means from minus to plus half range.&lt;/P&gt;&lt;P&gt;there should be a possibility to make it &lt;STRONG&gt;unsigned&lt;/STRONG&gt; differential mode&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can some one tell how to do it in the sdk?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2020 06:05:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/any-example-code-there-for-diffferential-mode-adc-in-frdm-k64/m-p/867566#M51771</guid>
      <dc:creator>eliarad2</dc:creator>
      <dc:date>2020-05-14T06:05:13Z</dc:date>
    </item>
  </channel>
</rss>

