<?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>ColdFire/68K Microcontrollers and ProcessorsのトピックRe: Unstable ADC result</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Unstable-ADC-result/m-p/183101#M7518</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you measured the ADC linearity?&lt;/P&gt;&lt;P&gt;Try plotting voltage vs count and see if it is a straight line.&lt;/P&gt;&lt;P&gt;I have a similar issue and have resorted to sampling method in firmware.&lt;/P&gt;&lt;P&gt;I have also found that VRH pin is very sensitive to noise.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Feb 2011 22:15:17 GMT</pubDate>
    <dc:creator>boogy</dc:creator>
    <dc:date>2011-02-14T22:15:17Z</dc:date>
    <item>
      <title>Unstable ADC result</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Unstable-ADC-result/m-p/183099#M7516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the MCF52259 micro to sample 8 channels.&amp;nbsp; The ADC results fluctuate (several hundred counts) even though the analog inputs are rock solid.&amp;nbsp; The VDD have some ripples (~25mV) and VDDA and VREFH have &amp;lt;5mV ripples.&amp;nbsp; So I don't think that problem lies with supply voltage.&amp;nbsp; I am using the ADC in once sequential mode with auto power down.&amp;nbsp; I re-arm the ADC every 250ms.&amp;nbsp; Any idea why the results are unstable?&amp;nbsp; Here is my ADC code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void AdcInit(void) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; MCF_ADC_CTRL1 = MCF_ADC_CTRL1_SMODE(0);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* once sequential scan mode */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; MCF_ADC_CTRL2 = MCF_ADC_CTRL2_DIV(47);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; MCF_ADC_POWER = MCF_ADC_POWER_PUDELAY(13) | MCF_ADC_POWER_APD | MCF_ADC_POWER_PD2;&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;void AdcTask(void) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; for(;&lt;A href="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif"&gt;&lt;IMG alt=":smileywink:" class="emoticon emoticon-smileywink" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif" title="Smiley Wink" /&gt;&lt;/A&gt; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MCF_ADC_CTRL1 |= MCF_ADC_CTRL1_STOP0;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* start conversion */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MCF_ADC_CTRL1 &amp;amp;= ~MCF_ADC_CTRL1_STOP0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MCF_ADC_CTRL1 |= MCF_ADC_CTRL1_START0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay for 250ms&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also played around with different ADC clock values (from 10 to 63).&amp;nbsp; I found that different clock values yield different ADC results with the same input level.&amp;nbsp; Shouldn't the ADC result be independent of the clock?&amp;nbsp; I also noticed that the fluctuation worsen with higher clock frequency.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Feb 2011 10:45:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Unstable-ADC-result/m-p/183099#M7516</guid>
      <dc:creator>Cary</dc:creator>
      <dc:date>2011-02-12T10:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: Unstable ADC result</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Unstable-ADC-result/m-p/183100#M7517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The signal source for the ADC should be sufficiently low-impedance in order to fully charge the ADC sampling capacitor during sampling. Sampling time depends on ADC clock, so this could explain why your results depend on ADC clock too.&lt;/P&gt;&lt;P&gt;If the signal is slow varying, a capactor (tens of nanofarads) at the input of the ADC should provide sufficient charge for the sampling capacitor.&lt;/P&gt;&lt;P&gt;By the way, the reference voltage and supply voltage should come from low-impedance sources too. This usually means sufficient number of ceramic decoupling capacitors close to MCU pins.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Feb 2011 01:10:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Unstable-ADC-result/m-p/183100#M7517</guid>
      <dc:creator>scifi</dc:creator>
      <dc:date>2011-02-13T01:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Unstable ADC result</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Unstable-ADC-result/m-p/183101#M7518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you measured the ADC linearity?&lt;/P&gt;&lt;P&gt;Try plotting voltage vs count and see if it is a straight line.&lt;/P&gt;&lt;P&gt;I have a similar issue and have resorted to sampling method in firmware.&lt;/P&gt;&lt;P&gt;I have also found that VRH pin is very sensitive to noise.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Feb 2011 22:15:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Unstable-ADC-result/m-p/183101#M7518</guid>
      <dc:creator>boogy</dc:creator>
      <dc:date>2011-02-14T22:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Unstable ADC result</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Unstable-ADC-result/m-p/183102#M7519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you scifi.&amp;nbsp; That was it.&amp;nbsp; My signal source had too high impedance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 11:18:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Unstable-ADC-result/m-p/183102#M7519</guid>
      <dc:creator>Cary</dc:creator>
      <dc:date>2011-02-16T11:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Unstable ADC result</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Unstable-ADC-result/m-p/183103#M7520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the tip, boogy.&amp;nbsp; I am watching VRH like a hawk now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 11:21:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Unstable-ADC-result/m-p/183103#M7520</guid>
      <dc:creator>Cary</dc:creator>
      <dc:date>2011-02-16T11:21:23Z</dc:date>
    </item>
  </channel>
</rss>

