<?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: How to make ADC counts &amp;quot;stable&amp;quot; in K20/K22 MCU ? in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-make-ADC-counts-quot-stable-quot-in-K20-K22-MCU/m-p/360975#M18322</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hemant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the chip has run 1-2 hours, it would be better to do ADC calculation again before ADC measurement.&lt;/P&gt;&lt;P&gt;Please try this and check if the result fluctuate will be reduced.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Wish it helps.&lt;BR /&gt;best regards &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, 17 Sep 2014 06:14:14 GMT</pubDate>
    <dc:creator>Hui_Ma</dc:creator>
    <dc:date>2014-09-17T06:14:14Z</dc:date>
    <item>
      <title>How to make ADC counts "stable" in K20/K22 MCU ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-make-ADC-counts-quot-stable-quot-in-K20-K22-MCU/m-p/360971#M18318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am using ADC in K20/K22 MCU. I see that if I give voltage input to ADC from calibrator then ADC raw counts vary above and below certain point. This variation is +- 100 counts of ADC on full scale. Though this is accurate, I want some "stable" reading. So how can I proceed ???&lt;/P&gt;&lt;P&gt;In k20/k22 adc initialization averaging is on (32 / 64 samples).&lt;/P&gt;&lt;P&gt;I want to make stable count without using averaging in software.&lt;/P&gt;&lt;P&gt;How Can i achieve this ??&amp;nbsp; &lt;/P&gt;&lt;P&gt;For my application this is must. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have observed that for K20/K22 MCU, raw counts of ADC gets drifted for 200-300 counts if we change MCU temperature from 0 degrees&amp;nbsp; to 60 degrees..&lt;/P&gt;&lt;P&gt;What is temperature drift of ADC???&lt;/P&gt;&lt;P&gt;Where it is specified in Datasheet ???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for reading.&lt;/P&gt;&lt;P&gt;Have a nice day!!&lt;/P&gt;&lt;P&gt;-Hemant Undale&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 05:48:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-make-ADC-counts-quot-stable-quot-in-K20-K22-MCU/m-p/360971#M18318</guid>
      <dc:creator>hemant2007</dc:creator>
      <dc:date>2014-09-12T05:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to make ADC counts "stable" in K20/K22 MCU ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-make-ADC-counts-quot-stable-quot-in-K20-K22-MCU/m-p/360972#M18319</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;There is an application note AN4373 about how to get more accuracy ADC measurement of Kinetis ADC module.&lt;/P&gt;&lt;P&gt;More detailed info, please check below link:&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://cache.freescale.com/files/microcontrollers/doc/app_note/AN4373.pdf"&gt;http://cache.freescale.com/files/microcontrollers/doc/app_note/AN4373.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you mentioned ADC module do calibration before measurement, please check below suggestions how to get more better performance:&lt;/P&gt;&lt;P&gt;*All digital I/Os should be silent,&lt;/P&gt;&lt;P&gt;*Unnecessary modules should be disabled&lt;/P&gt;&lt;P&gt;*VREFH should be stable and high voltage as possible (higher ADC code widths)&lt;/P&gt;&lt;P&gt;*isolated VREFH would be an ideal&lt;/P&gt;&lt;P&gt;*The ADC clock should be as noise free as possible (low jitter – PLL, FLL, OSC)&lt;/P&gt;&lt;P&gt;*Hardware averaging should be set to maximum (32 samples)&lt;/P&gt;&lt;P&gt;*Low power conversion should be disabled&lt;/P&gt;&lt;P&gt;*Do the calibration at room temperature&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far, Kinetis datasheet without ADC module temp drift refer info.&lt;/P&gt;&lt;P&gt;The ADC measurement temperature drift also could be affected by ADC reference voltage, please check the ADC reference voltage value during the measurement.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Wish it helps.&lt;BR /&gt;best regards &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>Mon, 15 Sep 2014 01:39:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-make-ADC-counts-quot-stable-quot-in-K20-K22-MCU/m-p/360972#M18319</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2014-09-15T01:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to make ADC counts "stable" in K20/K22 MCU ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-make-ADC-counts-quot-stable-quot-in-K20-K22-MCU/m-p/360973#M18320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you &lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://community.nxp.com/people/Hui_Ma"&gt;Hui_Ma&lt;/A&gt;&lt;/STRONG&gt;, Your answer is really helpful. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 04:44:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-make-ADC-counts-quot-stable-quot-in-K20-K22-MCU/m-p/360973#M18320</guid>
      <dc:creator>hemant2007</dc:creator>
      <dc:date>2014-09-15T04:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to make ADC counts "stable" in K20/K22 MCU ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-make-ADC-counts-quot-stable-quot-in-K20-K22-MCU/m-p/360974#M18321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A _jive_internal="true" class="jiveTT-hover-user jive-link-profile-small" data-containerid="-1" data-containertype="-1" data-content-finding="Community" data-objectid="15678" data-objecttype="3" href="https://community.nxp.com/people/Hui_Ma" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #6a737b;"&gt;Hui_Ma&lt;/A&gt;&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;Yesterday I read &lt;A class="jive-link-external-small" data-content-finding="Community" href="http://cache.freescale.com/files/microcontrollers/doc/app_note/AN4373.pdf" style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #6a737b;"&gt;AN4373.pdf&lt;/A&gt; and did some calculations as per it. Externally I connected R(in)=1000 Ohm and C(in)=1uF...... My unit is calibrated. Vref =1.25 volts and Vin = 500mv&amp;nbsp; Then ideal count of ADC would be = 26214. But practically I found that adc counts fluctuated between + - 30 counts above and below that count. Then as&amp;nbsp; I keep this set up ON for 1-2 hours then adc count fluctuates between&amp;nbsp; + - 100 counts above and below that value which is unacceptable to me. Why this is happening ? Ambient temperature is 25 to 27 Deg C fixed.&lt;/P&gt;&lt;P&gt;for my case &lt;/P&gt;&lt;P&gt;T (aquisition time)=1.2usec&lt;/P&gt;&lt;P&gt;Vcc=3.3 V&lt;/P&gt;&lt;P&gt;V(fsr)=1.25 v&lt;/P&gt;&lt;P&gt;N=16&lt;/P&gt;&lt;P&gt;total conversion time 400usec&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SIM_SCGC6 |= BIT_27 ; // Enable ADC0 Clock.&lt;/P&gt;&lt;P&gt;&amp;nbsp; ADC0_CFG1 = NORMAL_POWER_MODE | BUS_CLOCK_DIV_BY_TWO_AS_IP_CLK | IP_CLK_DIV_BY_EIGHT | LONG_SAMPLE_TIME | ADC_RESOLUTION_16_BIT ; &lt;/P&gt;&lt;P&gt;&amp;nbsp; ADC0_CFG2 = SET_OF_A_CHANNELS_AS_IP | ASYNCHRONOUS_CLK_OP_DISABLE | NORMAL_CONVERSION_SPEED | TWENTY_EXTRA_CLK_CYCLES ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ADC0_SC2&amp;nbsp; = SOFTWARE_TRIGGER | COMPARE_FUNCTION_DISABLE | DMA_DISABLE | EXTERNAL_REFERENCE ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADC0_SC3&amp;nbsp; = CONTINEOUS_CONVERSION | HARDWARE_AVERAGE_ENABLE | AVERAGE_THIRTY_TWO_SAMPLES ;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;*Unnecessary modules should be disabled =&amp;gt; they are disabled&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;*VREFH should be stable and high voltage as possible (higher ADC code widths) =&amp;gt; it is derived from separate IC regulator REF3112&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;*The ADC clock should be as noise free as possible (low jitter – PLL, FLL, OSC) =&amp;gt; How to check ?&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;*Hardware averaging should be set to maximum (32 samples) =&amp;gt; yes it is kept at 32 samples&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;*Low power conversion should be disabled =&amp;gt; yes it is disabled&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;*Do the calibration at room temperature =&amp;gt; yes calibration is done at room temperature.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;"Kinetis datasheet without ADC module temp drift refer info " =&amp;gt; why ? where can i get that specs ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to reduce this effect ? and reduce fluctuations.???&lt;/P&gt;&lt;P&gt;Thanks for patience!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---Hemant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 04:47:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-make-ADC-counts-quot-stable-quot-in-K20-K22-MCU/m-p/360974#M18321</guid>
      <dc:creator>hemant2007</dc:creator>
      <dc:date>2014-09-17T04:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to make ADC counts "stable" in K20/K22 MCU ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-make-ADC-counts-quot-stable-quot-in-K20-K22-MCU/m-p/360975#M18322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hemant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the chip has run 1-2 hours, it would be better to do ADC calculation again before ADC measurement.&lt;/P&gt;&lt;P&gt;Please try this and check if the result fluctuate will be reduced.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Wish it helps.&lt;BR /&gt;best regards &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, 17 Sep 2014 06:14:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-make-ADC-counts-quot-stable-quot-in-K20-K22-MCU/m-p/360975#M18322</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2014-09-17T06:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to make ADC counts "stable" in K20/K22 MCU ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-make-ADC-counts-quot-stable-quot-in-K20-K22-MCU/m-p/360976#M18323</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 didnot get you&lt;/P&gt;&lt;P&gt;Will you please elaborate?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 07:20:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-make-ADC-counts-quot-stable-quot-in-K20-K22-MCU/m-p/360976#M18323</guid>
      <dc:creator>hemant2007</dc:creator>
      <dc:date>2014-09-17T07:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to make ADC counts "stable" in K20/K22 MCU ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-make-ADC-counts-quot-stable-quot-in-K20-K22-MCU/m-p/360977#M18324</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;Sorry for the previous comments.&lt;/P&gt;&lt;P&gt;What I mentioned above is about recommended run calibration routine again after chip runs 1~2 hours later.&lt;/P&gt;&lt;P&gt;The chip temperature will rise after 1~2 hours working and the temperature drift will affect ADC measurement.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Wish it helps.&lt;BR /&gt;best regards &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, 17 Sep 2014 08:06:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-make-ADC-counts-quot-stable-quot-in-K20-K22-MCU/m-p/360977#M18324</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2014-09-17T08:06:57Z</dc:date>
    </item>
  </channel>
</rss>

