<?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: Spurious ADC values in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Spurious-ADC-values/m-p/755293#M30412</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There's my problem. Even though I'm only looking at one channel, &lt;SPAN style="font-family: andale mono, monospace;"&gt;LPC_ADC-&amp;gt;GDR&lt;/SPAN&gt; gives wonky values, but &lt;SPAN style="font-family: andale mono, monospace;"&gt;LPC_ADC-&amp;gt;DR[0] &lt;/SPAN&gt;doesn't.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Dec 2017 15:37:54 GMT</pubDate>
    <dc:creator>chrispflieger</dc:creator>
    <dc:date>2017-12-05T15:37:54Z</dc:date>
    <item>
      <title>Spurious ADC values</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Spurious-ADC-values/m-p/755291#M30410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LPC 1227 running at 36 MHz and I need to sample a DC signal, so roughly 1/10 second will be fine, no IRQ required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is I see a lot of spurious values coming from the ADC - I have a buffer of 36 recent values, and nine are just way out of bounds - like should be ~24600 but some are ~32000 and some below 1000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The setup code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;LPC_IOCON-&amp;gt;R_PIO0_30 = 0x00000003;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;LPC_SYSCON-&amp;gt;PDRUNCFG&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;= ~( 1ul &amp;lt;&amp;lt;&amp;nbsp; 4 ); // Power up ADC block&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;LPC_SYSCON-&amp;gt;SYSAHBCLKCTRL |=&amp;nbsp; ( 1ul &amp;lt;&amp;lt; 14 ); // Enable PCLK to ADC&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;LPC_ADC-&amp;gt;CR = 0x001010400 | (ENABLED_CHANNELS);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // set for burst mode with a 36MHz clock.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sample code:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while ((LPC_ADC-&amp;gt;GDR &amp;amp; 0x80000000) == 0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; result = (uint16_t)((LPC_ADC-&amp;gt;GDR &amp;amp; 0x0000FFC0) &amp;gt;&amp;gt; 6);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume there's some weird sampling problem because of burst mode, but is there something I need to do to synchronize sampling?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Dec 2017 22:03:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Spurious-ADC-values/m-p/755291#M30410</guid>
      <dc:creator>chrispflieger</dc:creator>
      <dc:date>2017-12-01T22:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: Spurious ADC values</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Spurious-ADC-values/m-p/755292#M30411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="305025" data-username="chrispflieger" href="https://community.nxp.com/people/chrispflieger"&gt;Chris Pflieger&lt;/A&gt;,&lt;/P&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;Thank you for your interest in NXP Semiconductor products and&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;for the opportunity to serve you.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;To provide the fastest possible support, I've attached a ADC demo and please refer to it for details.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&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;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2017 01:52:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Spurious-ADC-values/m-p/755292#M30411</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2017-12-05T01:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: Spurious ADC values</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Spurious-ADC-values/m-p/755293#M30412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There's my problem. Even though I'm only looking at one channel, &lt;SPAN style="font-family: andale mono, monospace;"&gt;LPC_ADC-&amp;gt;GDR&lt;/SPAN&gt; gives wonky values, but &lt;SPAN style="font-family: andale mono, monospace;"&gt;LPC_ADC-&amp;gt;DR[0] &lt;/SPAN&gt;doesn't.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2017 15:37:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Spurious-ADC-values/m-p/755293#M30412</guid>
      <dc:creator>chrispflieger</dc:creator>
      <dc:date>2017-12-05T15:37:54Z</dc:date>
    </item>
  </channel>
</rss>

