<?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: ADC - select pins in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/ADC-select-pins/m-p/1307600#M45861</link>
    <description>&lt;P&gt;Hello ,&lt;/P&gt;
&lt;P&gt;About ADC channel and 16 bit resolution, you can config in "Conversion commands configuration" :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alice_Yang_0-1626255573970.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/149803i5E304633CB01BDE3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alice_Yang_0-1626255573970.png" alt="Alice_Yang_0-1626255573970.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If can't get data, recommend first use ADC demo under SDK to test, and select and connect the right pin.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Jul 2021 09:41:58 GMT</pubDate>
    <dc:creator>Alice_Yang</dc:creator>
    <dc:date>2021-07-14T09:41:58Z</dc:date>
    <item>
      <title>ADC - select pins</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/ADC-select-pins/m-p/1307046#M45853</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a LPC55S16-EVK, and I'm using MCUXpresso IDE.&lt;/P&gt;&lt;P&gt;I'm working on a project that is based on&amp;nbsp;lpcxpresso55s16_dev_composite_cdc_msc_bm demo, And I'm trying to add ADC support.&lt;/P&gt;&lt;P&gt;I want to use pin 11 (ADC0 Channel 3B) and&amp;nbsp;pin 23 (ADC0 Channel 3A).&lt;/P&gt;&lt;P&gt;I soldered pin 11 and pin 23 to external wires that are connected to 2 terminals of the same resistor.&lt;/P&gt;&lt;P&gt;My goal is to measure the voltage drop on this resistor(difference between these 2 pins).&lt;/P&gt;&lt;P&gt;I configured the pins using config tool&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot from 2021-07-13 15-45-46.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/149701iFB1A8815405AAA50/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot from 2021-07-13 15-45-46.png" alt="Screenshot from 2021-07-13 15-45-46.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I configured the clock&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot from 2021-07-13 16-03-12.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/149702i9895EA1D880BC3E0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot from 2021-07-13 16-03-12.png" alt="Screenshot from 2021-07-13 16-03-12.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Peripheral:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot from 2021-07-13 17-52-22.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/149704i8C06EDB09EF2A852/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot from 2021-07-13 17-52-22.png" alt="Screenshot from 2021-07-13 17-52-22.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I copied the driver files (fsl_lpadc.*) from another demo to my drivers directory.&lt;/P&gt;&lt;P&gt;I tried to copy the main function code to my main function (just the relevant parts), and the code compiles, but the reads are wrong.&lt;/P&gt;&lt;P&gt;I read "46164" when I should read GND value.&lt;/P&gt;&lt;P&gt;I guess the problem is that I'm not selecting the correct pin.&lt;/P&gt;&lt;P&gt;How can I select, for example, pin 23 (ADC0 Channel 3A)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#define DEMO_LPADC_BASE                  ADC0
#define DEMO_LPADC_USER_CHANNEL          3U
#define DEMO_LPADC_USER_CMDID            1U&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;More generic questions: &lt;/P&gt;&lt;P&gt;* How can I configure ADC to 16 bit resolution?&lt;/P&gt;&lt;P&gt;* Does the driver can measure the difference between 2 pins? or should I read both and calculate it myself?&lt;/P&gt;&lt;P&gt;* If I should do it myself, how can I define 2 ADC?&lt;/P&gt;&lt;P&gt;* How can I use an internal timer to read the ADC values every X seconds?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 07:21:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/ADC-select-pins/m-p/1307046#M45853</guid>
      <dc:creator>embedded_eng_</dc:creator>
      <dc:date>2021-07-14T07:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: ADC - select pins</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/ADC-select-pins/m-p/1307600#M45861</link>
      <description>&lt;P&gt;Hello ,&lt;/P&gt;
&lt;P&gt;About ADC channel and 16 bit resolution, you can config in "Conversion commands configuration" :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alice_Yang_0-1626255573970.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/149803i5E304633CB01BDE3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alice_Yang_0-1626255573970.png" alt="Alice_Yang_0-1626255573970.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If can't get data, recommend first use ADC demo under SDK to test, and select and connect the right pin.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 09:41:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/ADC-select-pins/m-p/1307600#M45861</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2021-07-14T09:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: ADC - select pins</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/ADC-select-pins/m-p/1307684#M45864</link>
      <description>&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 14:04:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/ADC-select-pins/m-p/1307684#M45864</guid>
      <dc:creator>embedded_eng_</dc:creator>
      <dc:date>2021-07-14T14:04:45Z</dc:date>
    </item>
  </channel>
</rss>

