<?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: Problem with the ADC in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-the-ADC/m-p/1258848#M44572</link>
    <description>&lt;P&gt;There is no code attached covering the pin initialisation, usually done in pin_mux.c by the SDK code.&lt;/P&gt;&lt;P&gt;I suggest the get the proper SDK (if you haven't already), select a proper example for your MCU/board in MCUxpresso, and build it.&lt;/P&gt;&lt;P&gt;I would recommend one of the ADC examples in driver_examples/adc. The lpc_adc_dma and lpc_adc_interrupt examples worked for me out of the box. I used a LPC54628.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Apr 2021 11:27:16 GMT</pubDate>
    <dc:creator>frank_m</dc:creator>
    <dc:date>2021-04-08T11:27:16Z</dc:date>
    <item>
      <title>Problem with the ADC</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-the-ADC/m-p/1258642#M44564</link>
      <description>Good morning to you all. I'm working with a LPC54616, I'm trying to read the DC voltage coming from one of its ports, for that I configure the ADC, but I'm not able to measure the voltage. If anyone has experienced this and knows how to solve it. Thank you very much. Best regards.</description>
      <pubDate>Thu, 08 Apr 2021 07:28:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-the-ADC/m-p/1258642#M44564</guid>
      <dc:creator>Nadia</dc:creator>
      <dc:date>2021-04-08T07:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with the ADC</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-the-ADC/m-p/1258704#M44566</link>
      <description>&lt;P&gt;Hi, Nadia,&lt;/P&gt;
&lt;P&gt;Pls refer to the thread:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/LPC-Microcontrollers/LPC54018-Reading-Multiple-ADCs/m-p/1256343#M44521" target="_blank"&gt;https://community.nxp.com/t5/LPC-Microcontrollers/LPC54018-Reading-Multiple-ADCs/m-p/1256343#M44521&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;BTW, we have example code for ADC in SDK package, pls download SDK package from the link:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.nxp.com/design/software/development-software/mcuxpresso-software-and-tools-/mcuxpresso-software-development-kit-sdk:MCUXpresso-SDK" target="_blank"&gt;https://www.nxp.com/design/software/development-software/mcuxpresso-software-and-tools-/mcuxpresso-software-development-kit-sdk:MCUXpresso-SDK&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If you still have issue, pls post your code so that we can have a review or test.&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Xiangjun Rong&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 08:28:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-the-ADC/m-p/1258704#M44566</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2021-04-08T08:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with the ADC</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-the-ADC/m-p/1258775#M44569</link>
      <description>&lt;P&gt;I have tried to remove my code and use yours, but it doesn't work, I am only trying to read a DC signal that I input on channel 0 of the ADC.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 09:49:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-the-ADC/m-p/1258775#M44569</guid>
      <dc:creator>Nadia</dc:creator>
      <dc:date>2021-04-08T09:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with the ADC</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-the-ADC/m-p/1258840#M44571</link>
      <description>&lt;P&gt;Here I attach the code I use, it seems to work but not correctly, I read the values that come in through channels 0, 5 and 6 of the ADC0, and when I have no signal introduced they continue to give a value.&lt;/P&gt;&lt;P&gt;Can anyone tell me what the fault is?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 11:07:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-the-ADC/m-p/1258840#M44571</guid>
      <dc:creator>Nadia</dc:creator>
      <dc:date>2021-04-08T11:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with the ADC</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-the-ADC/m-p/1258848#M44572</link>
      <description>&lt;P&gt;There is no code attached covering the pin initialisation, usually done in pin_mux.c by the SDK code.&lt;/P&gt;&lt;P&gt;I suggest the get the proper SDK (if you haven't already), select a proper example for your MCU/board in MCUxpresso, and build it.&lt;/P&gt;&lt;P&gt;I would recommend one of the ADC examples in driver_examples/adc. The lpc_adc_dma and lpc_adc_interrupt examples worked for me out of the box. I used a LPC54628.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 11:27:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-the-ADC/m-p/1258848#M44572</guid>
      <dc:creator>frank_m</dc:creator>
      <dc:date>2021-04-08T11:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with the ADC</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-the-ADC/m-p/1259252#M44578</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I think the line is incorrect. Because the ADC0_0 channel is multiplexed with internal temperature and extrnal pin PI0_10.&lt;/P&gt;
&lt;P&gt;/* Use the temperature sensor input to channel 0. */&lt;BR /&gt;ADC_EnableTemperatureSensor(DEMO_ADC_BASE, true);&lt;/P&gt;
&lt;P&gt;As you know that the ADC channel0 is multiplexed with temperature sensor output.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1617934065414.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/141775iABAA0A1C547C7758/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1617934065414.png" alt="xiangjun_rong_0-1617934065414.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;it should be:&lt;/P&gt;
&lt;P&gt;ADC_EnableTemperatureSensor(DEMO_ADC_BASE, false);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Secondly, you should configure the PIO0_10 as ADC0_0 with the code:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;/* Enables the clock for the IOCON block. 0 = Disable; 1 = Enable.: 0x01u */&lt;BR /&gt;CLOCK_EnableClock(kCLOCK_Iocon);&lt;/P&gt;
&lt;P&gt;IOCON-&amp;gt;PIO[0][10] = ((IOCON-&amp;gt;PIO[0][10] &amp;amp;&lt;BR /&gt;/* Mask bits to zero which are setting */&lt;BR /&gt;(~(IOCON_PIO_FUNC_MASK | IOCON_PIO_MODE_MASK | IOCON_PIO_DIGIMODE_MASK)))&lt;/P&gt;
&lt;P&gt;/* Selects pin function.&lt;BR /&gt;* : PORT0_10&amp;nbsp; is configured as ADC0_0. */&lt;BR /&gt;| IOCON_PIO_FUNC(PIO016_FUNC_ALT0)&lt;/P&gt;
&lt;P&gt;/* Selects function mode (on-chip pull-up/pull-down resistor control).&lt;BR /&gt;* : Inactive.&lt;BR /&gt;* Inactive (no pull-down/pull-up resistor enabled). */&lt;BR /&gt;| IOCON_PIO_MODE(PIO016_MODE_INACTIVE)&lt;/P&gt;
&lt;P&gt;/* Select Analog/Digital mode.&lt;BR /&gt;* : Analog mode. */&lt;BR /&gt;| IOCON_PIO_DIGIMODE(PIO016_DIGIMODE_ANALOG));&lt;/P&gt;
&lt;P&gt;Pls have a try.&lt;/P&gt;
&lt;P&gt;Anyway, even if you do not connect the ADC0_0 pin(float), you will get a ADC sample, it is possible that the sample is not zero.&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;As a test, I suggest you connect the pin(ADC0_0) to GND or VDD via a serial 5K resistor as a test.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 02:20:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-the-ADC/m-p/1259252#M44578</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2021-04-09T02:20:48Z</dc:date>
    </item>
  </channel>
</rss>

