<?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 Problem with ADC1763 ADC in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-ADC1763-ADC/m-p/523781#M6417</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by alexxx on Tue Jun 25 23:31:01 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I read ADC every 10ms, inside systick interrupt. It is ADC 0. The problem is that every now and then (something like once or twice in a minute), the ADC returns 0xFFF. I investigated with the oscilloscope, but there is nothing wrong with hardware line on ADC0. Has anyone experienced a similar problem? I am using LPC1763, IAR compiler. My code is:&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;void initialize_adc (void)&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;{&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp; ADC_Init(LPC_ADC, 100000); &amp;nbsp;//100KHz&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp; ADC_IntConfig(LPC_ADC,ADC_ADINTEN0,DISABLE);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp; ADC_ChannelCmd(LPC_ADC,ADC_CHANNEL_0,ENABLE);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;}&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;unsigned int return_adc_channel ( const unsigned char CHANNEL_SETUP ) &amp;nbsp; //CHANNEL_SETUP is always 0 for this project&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;{ &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp; _UINT temp;&amp;lt;span class="Apple-tab-span" style="white-space: pre;"&amp;gt; &amp;lt;/span&amp;gt;//this is a union&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp; // Start conversion&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp; ADC_StartCmd(LPC_ADC,ADC_START_NOW);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp; //Wait conversion complete&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp; while (!(ADC_ChannelGetStatus(LPC_ADC,CHANNEL_SETUP,ADC_DATA_DONE)));&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp; //get ADC data&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp; temp.ivalue = ADC_ChannelGetData(LPC_ADC,CHANNEL_SETUP);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp; return temp.ivalue;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;}&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;So the problem is that this temp.ivalue returns a 0xFFF, but the voltage on ADC0 doesn't change. After this faulty measurement in the next ADC conversion, the returned value is again OK.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 18:05:09 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T18:05:09Z</dc:date>
    <item>
      <title>Problem with ADC1763 ADC</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-ADC1763-ADC/m-p/523781#M6417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by alexxx on Tue Jun 25 23:31:01 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I read ADC every 10ms, inside systick interrupt. It is ADC 0. The problem is that every now and then (something like once or twice in a minute), the ADC returns 0xFFF. I investigated with the oscilloscope, but there is nothing wrong with hardware line on ADC0. Has anyone experienced a similar problem? I am using LPC1763, IAR compiler. My code is:&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;void initialize_adc (void)&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;{&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp; ADC_Init(LPC_ADC, 100000); &amp;nbsp;//100KHz&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp; ADC_IntConfig(LPC_ADC,ADC_ADINTEN0,DISABLE);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp; ADC_ChannelCmd(LPC_ADC,ADC_CHANNEL_0,ENABLE);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;}&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;unsigned int return_adc_channel ( const unsigned char CHANNEL_SETUP ) &amp;nbsp; //CHANNEL_SETUP is always 0 for this project&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;{ &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp; _UINT temp;&amp;lt;span class="Apple-tab-span" style="white-space: pre;"&amp;gt; &amp;lt;/span&amp;gt;//this is a union&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp; // Start conversion&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp; ADC_StartCmd(LPC_ADC,ADC_START_NOW);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp; //Wait conversion complete&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp; while (!(ADC_ChannelGetStatus(LPC_ADC,CHANNEL_SETUP,ADC_DATA_DONE)));&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp; //get ADC data&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp; temp.ivalue = ADC_ChannelGetData(LPC_ADC,CHANNEL_SETUP);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp; return temp.ivalue;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;}&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;So the problem is that this temp.ivalue returns a 0xFFF, but the voltage on ADC0 doesn't change. After this faulty measurement in the next ADC conversion, the returned value is again OK.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:05:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-ADC1763-ADC/m-p/523781#M6417</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:05:09Z</dc:date>
    </item>
  </channel>
</rss>

