<?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>LPC Microcontrollers中的主题 Re: GPIO manipulation</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/GPIO-manipulation/m-p/959262#M38014</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The actual LCD we're using is:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.digikey.com/product-detail/en/newhaven-display-intl/NHD-0420E2Z-NSW-BBW/NHD-0420E2Z-NSW-BBW-ND/1701241" title="https://www.digikey.com/product-detail/en/newhaven-display-intl/NHD-0420E2Z-NSW-BBW/NHD-0420E2Z-NSW-BBW-ND/1701241"&gt;NHD-0420E2Z-NSW-BBW Newhaven Display Intl | Optoelectronics | DigiKey&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Sep 2019 14:17:11 GMT</pubDate>
    <dc:creator>gbarcan</dc:creator>
    <dc:date>2019-09-11T14:17:11Z</dc:date>
    <item>
      <title>GPIO manipulation</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/GPIO-manipulation/m-p/959254#M38006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am a newbie to NXP micros&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am using the LPC54xx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to output data on a set of pins. i will address each pin on its own becuase they are spread around&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am finding it very difficult to understand how GPIOs are manipulated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am setting them as output on the pin configuration tools and its being initialized by the generated code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to start putting 1s and 0s on the pins&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are the below the correct functions to use:&lt;/P&gt;&lt;P&gt;1. GPIO_PortClear ( , , ) to put 0 on the port&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for the pin i am using named enbale "E"&lt;/P&gt;&lt;P&gt;GPIO_PortClear (E_PIN_GPIO,E_PIN_PORT,1&amp;lt;&amp;lt; E_PIN_PIN);&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;GPIO_PortSet( , , ) to put&amp;nbsp;1 on the port&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for the pin i am usinf named enbale "E"&lt;/P&gt;&lt;P&gt;GPIO_PortSet (E_PIN_GPIO,E_PIN_PORT,1&amp;lt;&amp;lt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;E_PIN_PIN);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. GPIO_PortMaskedSet( , , )&amp;nbsp;to write "0" or "1"&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;GPIO_PortMaskedSet &lt;/SPAN&gt;(E_PIN_GPIO,E_PIN_PORT,1&amp;lt;&amp;lt;(val&amp;amp;(1&amp;lt;&amp;lt;7))!=0&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;please let me know if i am on the right track&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Eman&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Aug 2019 13:12:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/GPIO-manipulation/m-p/959254#M38006</guid>
      <dc:creator>eman_koosha</dc:creator>
      <dc:date>2019-08-23T13:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO manipulation</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/GPIO-manipulation/m-p/959255#M38007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Eman,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have the right idea of how to write zeroes and ones to the pins. Though you have to consider some other factors as well.&lt;/P&gt;&lt;P&gt;Firstly make sure that you have initialized the clock of the port you will be using.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You also should initialize the port and specific pin incase you use different pins as either inputs or outputs&lt;/P&gt;&lt;P&gt;Once this is done you may be able to write one or zero to that pin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you confirm if you are using MCUXpresso and the complete part number of your LPC54. This way I can provide the correct examples you can try with your microcontroller.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Sabina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2019 23:59:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/GPIO-manipulation/m-p/959255#M38007</guid>
      <dc:creator>Sabina_Bruce</dc:creator>
      <dc:date>2019-08-26T23:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO manipulation</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/GPIO-manipulation/m-p/959256#M38008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sabina&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;thanks for your reply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am using&amp;nbsp;&amp;nbsp;LPC54618J512BD208 and&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;MCUXpresso&lt;SPAN&gt;&amp;nbsp;&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;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;I did go through the pin configurator and had the code generated through there. can i assume all the OK (initialized) or are there any further steps needed. i did see the init code that enables the clock in that generated&amp;nbsp;code i also think i see the pin initialization&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;examples would be great&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2019 17:59:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/GPIO-manipulation/m-p/959256#M38008</guid>
      <dc:creator>eman_koosha</dc:creator>
      <dc:date>2019-09-03T17:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO manipulation</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/GPIO-manipulation/m-p/959257#M38009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eman,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to check the examples for all peripheral that you can work with uing your LPC board. You need to download the SDK in our &lt;A href="https://mcuxpresso.nxp.com/en/welcome"&gt;MCUXPresso SDK Website&lt;/A&gt;. If you are using the LPCXpresso54618 board then you can find it by clicking on "&lt;STRONG&gt;Select Development Board&lt;/STRONG&gt;".&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/81345iF6207D0B07326DE8/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You will see the page come to this section, you can search for the microcontroller you are using or the development board you are using. In my case I have the LPCXpresso54618, so I search that.&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/81443iD24361BA5A4F1CBF/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If you have a different board or a custom board you can search by the microcontroller name only.&lt;/P&gt;&lt;P&gt;Once you have selected your board you will see a button on the right hand side that says "&lt;STRONG&gt;Build MCUXpresso SDK&lt;/STRONG&gt;". Next you will have your SDK builder, for the optional middleware I suggest to select all.&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_7.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/81592iC3B6B23FCA46E6CF/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_7.png" alt="pastedImage_7.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then press download.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once downloaded you can drag this zip folder to the Installed SDKs window, as shown below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_9.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/81910iB729A62452C5D1BC/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_9.png" alt="pastedImage_9.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Next to view the examples you can click on "&lt;STRONG&gt;Import&amp;nbsp;SDK examples&lt;/STRONG&gt;"&amp;nbsp;in the Quickstart Panel.&lt;/P&gt;&lt;P&gt;Here you will find all the examples that have been created for different purposes. The one I recommend you take a look to see how GPIO works are the following under driver_examples &amp;gt; gpio:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_17.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/81985i3B2F967B33F56F0B/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_17.png" alt="pastedImage_17.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This uses both led and switches.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you use the pin configuration tool then all the changes including initialization are done automatically.&lt;/P&gt;&lt;P&gt;For detailed information about the registers and pins for the GPIO. You can check&lt;A href="https://www.nxp.com/webapp/Download?colCode=UM10912"&gt; chapter 13&lt;/A&gt; of the user manual.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you try the example and the different configurations, let me know if you have any toher questions regarding the functionality of the GPIO pins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Sabina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2019 19:49:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/GPIO-manipulation/m-p/959257#M38009</guid>
      <dc:creator>Sabina_Bruce</dc:creator>
      <dc:date>2019-09-03T19:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO manipulation</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/GPIO-manipulation/m-p/959258#M38010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sabina&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using this example actually.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried to follow in its footsteps but i am not successful yet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will do some reading and see how it goes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Eman&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2019 13:26:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/GPIO-manipulation/m-p/959258#M38010</guid>
      <dc:creator>eman_koosha</dc:creator>
      <dc:date>2019-09-04T13:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO manipulation</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/GPIO-manipulation/m-p/959259#M38011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eman,&lt;/P&gt;&lt;P&gt;If you can share your project please attach it to this post and I can check it with detail.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Sabina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2019 23:17:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/GPIO-manipulation/m-p/959259#M38011</guid>
      <dc:creator>Sabina_Bruce</dc:creator>
      <dc:date>2019-09-04T23:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO manipulation</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/GPIO-manipulation/m-p/959260#M38012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Sabina&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;attached is the code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Eman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 09:29:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/GPIO-manipulation/m-p/959260#M38012</guid>
      <dc:creator>eman_koosha</dc:creator>
      <dc:date>2019-09-05T09:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO manipulation</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/GPIO-manipulation/m-p/959261#M38013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Eman,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been checking your code with detail to see how you are implementing the GPIO peripheral. I can see that the switch and led work fine as it is from the example in the SDK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can also see that you are using an LCD display to print some text. I have some observations that may help in successfully using GPIO for your LCD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First I'd like to understand what it is your achieving with the following &lt;STRONG&gt;toggles. &lt;/STRONG&gt;The reason I am asking is because prior to this I do not see if you are initializing this with a set value, like the led is in the SDK example. So if you apply a toggle to an unknown state pin you might not be seeing what you are expecting.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/79989i592AB7FD14326519/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general I can see you have an idea of what you need to do. It is just a matter of debugging to find where the root issue is that is preventing you from seeing the results.&lt;/P&gt;&lt;P&gt;If you can provide the LCD display that you are using (&lt;STRONG&gt;the part number&lt;/STRONG&gt;). This way I can verify the sequence to write a character it will help me understand what you are trying to achieve.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know as soon as you can so I can continue to support you.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Sabina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2019 19:39:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/GPIO-manipulation/m-p/959261#M38013</guid>
      <dc:creator>Sabina_Bruce</dc:creator>
      <dc:date>2019-09-10T19:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO manipulation</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/GPIO-manipulation/m-p/959262#M38014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The actual LCD we're using is:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.digikey.com/product-detail/en/newhaven-display-intl/NHD-0420E2Z-NSW-BBW/NHD-0420E2Z-NSW-BBW-ND/1701241" title="https://www.digikey.com/product-detail/en/newhaven-display-intl/NHD-0420E2Z-NSW-BBW/NHD-0420E2Z-NSW-BBW-ND/1701241"&gt;NHD-0420E2Z-NSW-BBW Newhaven Display Intl | Optoelectronics | DigiKey&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2019 14:17:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/GPIO-manipulation/m-p/959262#M38014</guid>
      <dc:creator>gbarcan</dc:creator>
      <dc:date>2019-09-11T14:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO manipulation</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/GPIO-manipulation/m-p/959263#M38015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for providing the info. We have received your internal case as well. We can continue the support there for other questions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Sabina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2019 21:58:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/GPIO-manipulation/m-p/959263#M38015</guid>
      <dc:creator>Sabina_Bruce</dc:creator>
      <dc:date>2019-09-11T21:58:59Z</dc:date>
    </item>
  </channel>
</rss>

