<?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 lpc1549 adc_5 enable problem in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc1549-adc-5-enable-problem/m-p/986311#M38892</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. I have my ADC already running in initialization. This works perfectly. What I am running into is this. I want to change the GPIO over to a ADC input after initialization of the system #and the PINENABLE0 (ADC0_5) is not allowing me. I read the register, change the contents to what I want and save it to the register but the register ignores the changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas here??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Charles&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Nov 2019 21:41:18 GMT</pubDate>
    <dc:creator>charles_grenz</dc:creator>
    <dc:date>2019-11-13T21:41:18Z</dc:date>
    <item>
      <title>lpc1549 adc_5 enable problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc1549-adc-5-enable-problem/m-p/986311#M38892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. I have my ADC already running in initialization. This works perfectly. What I am running into is this. I want to change the GPIO over to a ADC input after initialization of the system #and the PINENABLE0 (ADC0_5) is not allowing me. I read the register, change the contents to what I want and save it to the register but the register ignores the changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas here??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Charles&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2019 21:41:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc1549-adc-5-enable-problem/m-p/986311#M38892</guid>
      <dc:creator>charles_grenz</dc:creator>
      <dc:date>2019-11-13T21:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: lpc1549 adc_5 enable problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc1549-adc-5-enable-problem/m-p/986312#M38893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Charles,&lt;/P&gt;&lt;P&gt;Thank you for your interest in NXP Semiconductor products and &lt;BR /&gt;for the opportunity to serve you.&lt;BR /&gt;Actually, I'm not very clear with your question, whether you mean that the PIO0_3 can't be able to be used as the input of ADC.&lt;BR /&gt;In further, I'd highly recommend you to refer to the ADC demo in the &lt;A href="https://www.nxp.com/design/microcontrollers-developer-resources/lpcopen-libraries-and-examples/lpcopen-software-development-platform-lpc15xx:LPCOPEN-SOFTWARE-FOR-LPC15XX"&gt;LPCOpen's library&lt;/A&gt;, it shows how to use the ADC to performa sequence of conversions and monitor a threshold crossing.&lt;/P&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:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Nov 2019 02:31:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc1549-adc-5-enable-problem/m-p/986312#M38893</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2019-11-14T02:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: lpc1549 adc_5 enable problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc1549-adc-5-enable-problem/m-p/986313#M38894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeremy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for getting back to me. Currently I initialize the LPC1549 with no problems. This includes 4 ADC lines in both ADC0 and ADC1. I have no problems with the interrupts and reading the data. The problem I am having is after initialization, I try to turn PIO_3 from a digital input to an ADC input (ADC0_5) using by reading the&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;PINENABLE0 register into an unsigned 32 bit variable and take the inverse of the bit shifted over 5 places and anding that with the register value to turn that bit to 0. I then write the variable back to the&amp;nbsp;&lt;SPAN&gt;PINENABLE0 register which ignores the change.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;DWord_T temp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;DWord_T adc_channel = 5;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;/* Disables pullups/pulldowns and disable digital mode */&lt;BR /&gt; Chip_IOCON_PinMuxSet(LPC_IOCON, port, pin, (IOCON_MODE_INACT | IOCON_ADMODE_EN));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Assign ADC Channels via SWM (fixed pin) */&lt;BR /&gt; temp = PINENABLE0;&lt;BR /&gt; temp = temp &amp;amp; ~(1 &amp;lt;&amp;lt; adc_channel);&lt;BR /&gt; PINENABLE0 = temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;While in debug mode and single step through the process and see that the values are all correct but yet after the write condition I reread the register and bit 5 is still a 1.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;regards,&lt;BR /&gt;Charles&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Nov 2019 14:10:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc1549-adc-5-enable-problem/m-p/986313#M38894</guid>
      <dc:creator>charles_grenz</dc:creator>
      <dc:date>2019-11-14T14:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: lpc1549 adc_5 enable problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc1549-adc-5-enable-problem/m-p/986314#M38895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Hi Jeremy,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Been digging into this some more. I have a scope on the PIO_3 input. It is set for an input and this does not change. What I noticed is when I change PIO_4 which is an output from a 1 value to a 0 value (&lt;SPAN&gt;PIN[0] PORT 4)&lt;/SPAN&gt;, I see that the PIN[0] PORT 3 is also being set to 0 even though the DIR[0] for DIRP3 = 0 and DIR[0] for DIRP4 = 1. I went into the disassembly view and watched the registers being set and it is perfect but the data when stored is not being accepted.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I am using a Segger JLink Pro with version&amp;nbsp;V6.54c, compiled Nov&amp;nbsp; 7 2019 17:01:02.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I am using IAR Embedded Workbench for ARM 7.80.4.12495&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;The processor is a LPC1549JBD48QL&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;The markings on the processor are as follows:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;LPC1549J&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;18&amp;nbsp; &amp;nbsp; 03&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ZSD18 (The Z can either be a Z or a 7)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 222A&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I swapped out JLinks and updated all the firmware.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I am debugging this with a i7 4 core running at 4Ghz and is 64 bit Win 7 with 16G of ram and 3T bytes of solid state hard drive. Graphics is a NVidia GeForce GTX 1050 Ti.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Charles&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Nov 2019 17:44:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc1549-adc-5-enable-problem/m-p/986314#M38895</guid>
      <dc:creator>charles_grenz</dc:creator>
      <dc:date>2019-11-14T17:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: lpc1549 adc_5 enable problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc1549-adc-5-enable-problem/m-p/986315#M38896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Charles,&lt;/P&gt;&lt;P&gt;Thanks for your clarification.&lt;BR /&gt;I use the ADC demo which is from the LPCOpen library for testing, and I'm able to configure the PIO0_3 as the ADC0_5 pin via the below code, please give a try.&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;    &lt;SPAN class="comment token"&gt;/* Disables pullups/pulldowns and disable digital mode */&lt;/SPAN&gt;
    &lt;SPAN class="token function"&gt;Chip_IOCON_PinMuxSet&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;LPC_IOCON&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;IOCON_MODE_INACT &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt; IOCON_DIGMODE_EN&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;


    &lt;SPAN class="comment token"&gt;/* Assign ADC1_0 to PIO1_1 via SWM (fixed pin) */&lt;/SPAN&gt;
    &lt;SPAN class="token function"&gt;Chip_SWM_EnableFixedPin&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;SWM_FIXED_ADC0_5&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&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:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Nov 2019 08:13:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc1549-adc-5-enable-problem/m-p/986315#M38896</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2019-11-15T08:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: lpc1549 adc_5 enable problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc1549-adc-5-enable-problem/m-p/986316#M38897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Jeremy,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Thank you for your help. I was about to add your version of the code to mine and retry. However to do that I needed to clear the processor program memory and that is when I discovered that my tech connected a pull-up to the ADC input not to a power source but to a communications line output that is toggled every time a response to the host is initiated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Charles&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Nov 2019 17:46:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc1549-adc-5-enable-problem/m-p/986316#M38897</guid>
      <dc:creator>charles_grenz</dc:creator>
      <dc:date>2019-11-15T17:46:40Z</dc:date>
    </item>
  </channel>
</rss>

