<?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>Kinetis MicrocontrollersのトピックRe: FRDM-K22F ADC Differential Mode</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K22F-ADC-Differential-Mode/m-p/741424#M45189</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's what I found.&lt;/P&gt;&lt;P&gt;In my code above I declared the global variable 'value' as "static unit16_t ..."&lt;/P&gt;&lt;P&gt;However, in Component Inspector I set 'A/D resolution'&amp;nbsp;to 12bits.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Equally important,&amp;nbsp; in 'Methods' I chose "GetValue16".&amp;nbsp; I assume this was a problem as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My corrections were:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; In Main.c I changed&amp;nbsp;&lt;SPAN&gt;global variable 'value', "static unit16_t ..." to "static int value;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2.&amp;nbsp; Also in Main.c in conjunction with "Components" I changed "GetValue16" to "GetValue".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now when use debuger and watch the variable 'value', I get the correct answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below I have included my code with the above changes for all to see if&amp;nbsp;anyone&amp;nbsp;has the same issue.&lt;/P&gt;&lt;P&gt;I'm certain there are other ways to do it as well.&amp;nbsp; If anyone would like to share another way please be my guest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brian&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 src="https://community.nxp.com/t5/image/serverpage/image-id/38407iB584FF5BC2388C0A/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;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Nov 2017 01:29:20 GMT</pubDate>
    <dc:creator>briancavanagh</dc:creator>
    <dc:date>2017-11-28T01:29:20Z</dc:date>
    <item>
      <title>FRDM-K22F ADC Differential Mode</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K22F-ADC-Differential-Mode/m-p/741421#M45186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have not been successful with making a differential measurement on ADC0_DP0 and ACD0_DM0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was taking the approach similar to 'Multiple Channel' measurements.&amp;nbsp; My thought was DP0 would have a value and DM0 would also have a value.&amp;nbsp; As a result, I anticipated DP0 - DM0 would give my final "Differential" result.&amp;nbsp; This didn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then proceeded to take the single-end channel approach, even though I set 'Mode Select' to 'Differential'.&lt;/P&gt;&lt;P&gt;I was thinking the 'Differential' result would be one value that I can read.&amp;nbsp; I still think this was wrong.&amp;nbsp; I'm also not clear on my resolution actually is.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is a screen capture of ADC1 Component settings, Methods, and finally my code.&lt;/P&gt;&lt;P&gt;Can someone help me get this started?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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/36886i5C6C6805BF541BCC/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;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/36887i7AE77CA7E49AE722/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.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/36804i57F4E3636948E86B/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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2017 21:38:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K22F-ADC-Differential-Mode/m-p/741421#M45186</guid>
      <dc:creator>briancavanagh</dc:creator>
      <dc:date>2017-11-27T21:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K22F ADC Differential Mode</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K22F-ADC-Differential-Mode/m-p/741422#M45187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also note, I used the Debuger to step through my code and highlighted the &amp;amp;value variable at various voltages from 0&lt;SPAN&gt;Vdc to 3.3Vdc and received the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0&lt;SPAN&gt;Vdc&lt;/SPAN&gt; = 0x8000&lt;/P&gt;&lt;P&gt;.5&lt;SPAN&gt;Vdc&lt;/SPAN&gt; = 0x92f0&lt;/P&gt;&lt;P&gt;1.0&lt;SPAN&gt;Vdc&lt;/SPAN&gt; = 0xa690&lt;/P&gt;&lt;P&gt;1.5Vdc = 0xb9e0&lt;/P&gt;&lt;P&gt;2&lt;SPAN&gt;Vdc = 0xce10&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2.5Vdc = 0xe0d0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3.2Vdc = 0xfff8&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2017 21:46:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K22F-ADC-Differential-Mode/m-p/741422#M45187</guid>
      <dc:creator>briancavanagh</dc:creator>
      <dc:date>2017-11-27T21:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K22F ADC Differential Mode</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K22F-ADC-Differential-Mode/m-p/741423#M45188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ADC has a single-ended or differential &lt;EM&gt;mode select&lt;/EM&gt;. When in single-ended mode you know how it works.&lt;BR /&gt;If differential mode is selected (DIFF is set in ADC1_SC1A) it configures the ADC input to not be take from a single pin but to be taken from the difference between two specific pins (or an internal differential connection to the temperature sensor, band-gap or VREFSH). External pins are limited to channels 0..3 (if available).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apart from the configuration and connection there is no difference in reading. The same single value can be read from the ADC's RA register.&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;SPAN&gt;Kinetis: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis.html&lt;/A&gt;&lt;BR /&gt;K22:&lt;BR /&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FFRDM-K22F.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/FRDM-K22F.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FTWR-K22F120M.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/TWR-K22F120M.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FBLAZE_K22.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/BLAZE_K22.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;ADC/DAC: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fdocs%2FuTasker%2FuTaskerADC.pdf" rel="nofollow" target="_blank"&gt;http://www.utasker.com/docs/uTasker/uTaskerADC.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2017 23:48:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K22F-ADC-Differential-Mode/m-p/741423#M45188</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-11-27T23:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K22F ADC Differential Mode</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K22F-ADC-Differential-Mode/m-p/741424#M45189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's what I found.&lt;/P&gt;&lt;P&gt;In my code above I declared the global variable 'value' as "static unit16_t ..."&lt;/P&gt;&lt;P&gt;However, in Component Inspector I set 'A/D resolution'&amp;nbsp;to 12bits.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Equally important,&amp;nbsp; in 'Methods' I chose "GetValue16".&amp;nbsp; I assume this was a problem as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My corrections were:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; In Main.c I changed&amp;nbsp;&lt;SPAN&gt;global variable 'value', "static unit16_t ..." to "static int value;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2.&amp;nbsp; Also in Main.c in conjunction with "Components" I changed "GetValue16" to "GetValue".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now when use debuger and watch the variable 'value', I get the correct answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below I have included my code with the above changes for all to see if&amp;nbsp;anyone&amp;nbsp;has the same issue.&lt;/P&gt;&lt;P&gt;I'm certain there are other ways to do it as well.&amp;nbsp; If anyone would like to share another way please be my guest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brian&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 src="https://community.nxp.com/t5/image/serverpage/image-id/38407iB584FF5BC2388C0A/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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Nov 2017 01:29:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K22F-ADC-Differential-Mode/m-p/741424#M45189</guid>
      <dc:creator>briancavanagh</dc:creator>
      <dc:date>2017-11-28T01:29:20Z</dc:date>
    </item>
  </channel>
</rss>

