<?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: ADC Differential Mode in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-Differential-Mode/m-p/1350848#M61644</link>
    <description>&lt;P&gt;Hi there, I am also using the same series.&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;I guess the ADC register result, ADC-&amp;gt;RSLT[0], is not producing something in the negative range.&amp;nbsp;&lt;BR /&gt;What I did is making a conversion function/statement to the unit / range I want.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;For your case, you are mapping (ch1-ch0) to -4095 ~ +4095 whilst the original result It 0-4095&lt;BR /&gt;What about a quick fix&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;signed count_you_finally_get&amp;nbsp; = ((Result_original &amp;gt;&amp;gt; 3 ) &amp;lt;&amp;lt; 1 ) -&amp;nbsp; 4095 ?&lt;BR /&gt;&lt;BR /&gt;Here &amp;gt;&amp;gt; 3 is making it right align.&amp;nbsp;&lt;BR /&gt;&amp;lt;&amp;lt;1 is x2 for mapping your wished range for 8192 counts.&amp;nbsp;&lt;BR /&gt;-4095 is the offset&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I expect there are some register setting can help manipulate the result format but I try to prevent diving into it. = )&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Oct 2021 01:27:42 GMT</pubDate>
    <dc:creator>D4Worker</dc:creator>
    <dc:date>2021-10-06T01:27:42Z</dc:date>
    <item>
      <title>ADC Differential Mode</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-Differential-Mode/m-p/1350401#M61630</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I enabled differential mode by setting enableDifferentialPair to true (CADC driver), and I get values between 0 and 4095.&lt;/P&gt;&lt;P&gt;2048&amp;nbsp; when ADC channel 0 = ADC channel 1&lt;/P&gt;&lt;P&gt;0 &amp;lt; ADC result &amp;lt; 2048 (when ADC channel 0 &amp;lt; ADC channel 1)&lt;/P&gt;&lt;P&gt;2048 &amp;lt; ADC result &amp;lt; 4095 (when ADC channel 0 &amp;gt; ADC channel 1).&lt;/P&gt;&lt;P&gt;&amp;nbsp;I was expecting the values to be between -4095 and 4095 (signed). The ADC result is 16 bit (3 bits left shifted and the 16th bit is signed bit when using differential mode).&lt;/P&gt;&lt;P&gt;Is there an example code for configuring differential mode?&lt;/P&gt;&lt;P&gt;I'm using MKV46 .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2021 06:58:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-Differential-Mode/m-p/1350401#M61630</guid>
      <dc:creator>ZYXEmbedded</dc:creator>
      <dc:date>2021-10-05T06:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: ADC Differential Mode</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-Differential-Mode/m-p/1350848#M61644</link>
      <description>&lt;P&gt;Hi there, I am also using the same series.&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;I guess the ADC register result, ADC-&amp;gt;RSLT[0], is not producing something in the negative range.&amp;nbsp;&lt;BR /&gt;What I did is making a conversion function/statement to the unit / range I want.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;For your case, you are mapping (ch1-ch0) to -4095 ~ +4095 whilst the original result It 0-4095&lt;BR /&gt;What about a quick fix&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;signed count_you_finally_get&amp;nbsp; = ((Result_original &amp;gt;&amp;gt; 3 ) &amp;lt;&amp;lt; 1 ) -&amp;nbsp; 4095 ?&lt;BR /&gt;&lt;BR /&gt;Here &amp;gt;&amp;gt; 3 is making it right align.&amp;nbsp;&lt;BR /&gt;&amp;lt;&amp;lt;1 is x2 for mapping your wished range for 8192 counts.&amp;nbsp;&lt;BR /&gt;-4095 is the offset&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I expect there are some register setting can help manipulate the result format but I try to prevent diving into it. = )&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Oct 2021 01:27:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-Differential-Mode/m-p/1350848#M61644</guid>
      <dc:creator>D4Worker</dc:creator>
      <dc:date>2021-10-06T01:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: ADC Differential Mode</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-Differential-Mode/m-p/1351320#M61647</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/72240"&gt;@D4Worker&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I did something similar.&lt;/P&gt;&lt;P&gt;Right now I'm setting an offset of 2048, so the result is between -2048 and 2048. And then I left-shift the 13-bit result by one. I was hoping there was a way to get the values between -4095 and 4095 without performing additional operations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Oct 2021 16:19:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-Differential-Mode/m-p/1351320#M61647</guid>
      <dc:creator>ZYXEmbedded</dc:creator>
      <dc:date>2021-10-06T16:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: ADC Differential Mode</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-Differential-Mode/m-p/1353075#M61667</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/192025"&gt;@ZYXEmbedded&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;This is a 12bit ADC. If the output is from -4096~+4096, that is 13bit. The signal bit is also a bit.&lt;/P&gt;
&lt;P&gt;In fact,&amp;nbsp;Differential measurements return the max value ((2**12)-1) when the + input is V REFH and the - input is VREFLO , return 0 when the + input is at V REFLO and the - input is at VREFH , and scale linearly between based on the voltage difference between the two signals.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Jing&lt;/P&gt;</description>
      <pubDate>Sat, 09 Oct 2021 09:32:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-Differential-Mode/m-p/1353075#M61667</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2021-10-09T09:32:57Z</dc:date>
    </item>
  </channel>
</rss>

