<?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: Help with GPIO for new user in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Help-with-GPIO-for-new-user/m-p/525876#M8512</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by cthvx8@hotmail.com on Mon Mar 02 12:07:23 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok so I figured out that I had to configure the I/O like so:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_IOCON-&amp;gt;PIO0[0]=1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_IOCON-&amp;gt;PIO0[1]=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_IOCON-&amp;gt;PIO0[2]=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_IOCON-&amp;gt;PIO0[3]=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I still couldn't get the expected behaviour when I used the "Chip_GPIO_SetMaskedPortValue" function.&amp;nbsp; I got it to work when I used the "Chip_GPIO_SetPortValue" function however.&amp;nbsp; What is wrong with the way I set up the masking in my earlier post?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 16:59:06 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T16:59:06Z</dc:date>
    <item>
      <title>Help with GPIO for new user</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Help-with-GPIO-for-new-user/m-p/525874#M8510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by cthvx8@hotmail.com on Fri Feb 27 10:58:05 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I am just starting out with microcontrollers and I need some help to get me going.&amp;nbsp; I attempted to write some basic code to turn on and off some LEDs which I connected to pins 0-7 on Port0.&amp;nbsp; I wanted to alternate them between 10101010 and 01010101 with a delay in between.&amp;nbsp; It doesn't seem to be working and I was hoping someone could have a look and tell me what I'm doing wrong.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#if defined (__USE_LPCOPEN)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#if defined(NO_BOARD_LIB)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#include "chip.h"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#else&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#include "board.h"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#endif&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#endif&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#include &amp;lt;cr_section_macros.h&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// TODO: insert other include files here&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// TODO: insert other definitions and declarations here&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;volatile uint32_t msTicks=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// Systick Handler which is called each ms&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;void SysTick_Handler(void)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; msTicks++;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// blocks for dlyTicks ms...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;static void Delay(uint32_t dlyTicks)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t curTicks;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; curTicks = msTicks;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while ((msTicks - curTicks) &amp;lt; dlyTicks);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//------------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;int main(void) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#if defined (__USE_LPCOPEN)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#if !defined(NO_BOARD_LIB)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Read clock settings and update SystemCoreClock variable&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SystemCoreClockUpdate();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set up and initialize all required blocks and&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // functions related to the board hardware&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Board_Init();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set the LED to the state of "On"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Board_LED_Set(0, true);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#endif&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#endif&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // TODO: insert code here&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Initialize Port 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chip_GPIO_Init(LPC_GPIO_PORT);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//Set Port 0 pins 0-7 to output&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chip_GPIO_SetPortDIROutput(LPC_GPIO_PORT, 0, 0xFF);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Chip_GPIO_SetPortMask(LPC_GPIO_PORT, 0, 0xFF);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SysTick_Config(SystemCoreClock/1000);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;while(1){&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//Set Port 0 pins to 01010101&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chip_GPIO_SetMaskedPortValue(LPC_GPIO_PORT, 0, 0X55);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Board_LED_Set(0, true);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//Wait 1 second&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Delay(1000);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//Set Port 0 pins to 10101010&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chip_GPIO_SetMaskedPortValue(LPC_GPIO_PORT, 0, 0XFF);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Board_LED_Set(0, false);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//Wait 1 second&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Delay(1000);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Force the counter to be placed into memory&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; volatile static int i = 0 ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Enter an infinite loop, just incrementing a counter&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(1) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i++ ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 0 ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:59:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Help-with-GPIO-for-new-user/m-p/525874#M8510</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: Help with GPIO for new user</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Help-with-GPIO-for-new-user/m-p/525875#M8511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by starblue on Fri Feb 27 13:23:18 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Take a look at I/O configuration (chapter 7 in the user manual).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:59:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Help-with-GPIO-for-new-user/m-p/525875#M8511</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: Help with GPIO for new user</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Help-with-GPIO-for-new-user/m-p/525876#M8512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by cthvx8@hotmail.com on Mon Mar 02 12:07:23 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok so I figured out that I had to configure the I/O like so:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_IOCON-&amp;gt;PIO0[0]=1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_IOCON-&amp;gt;PIO0[1]=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_IOCON-&amp;gt;PIO0[2]=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_IOCON-&amp;gt;PIO0[3]=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I still couldn't get the expected behaviour when I used the "Chip_GPIO_SetMaskedPortValue" function.&amp;nbsp; I got it to work when I used the "Chip_GPIO_SetPortValue" function however.&amp;nbsp; What is wrong with the way I set up the masking in my earlier post?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:59:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Help-with-GPIO-for-new-user/m-p/525876#M8512</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Help with GPIO for new user</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Help-with-GPIO-for-new-user/m-p/525877#M8513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by R2D2 on Mon Mar 02 14:04:37 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;&lt;SPAN&gt;Quote: &lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:cthvx8@hotmail.com" rel="nofollow noopener noreferrer" target="_blank"&gt;cthvx8@hotmail.com&lt;/A&gt;&lt;/STRONG&gt;&lt;BR /&gt; What is wrong with the way I set up the masking in my earlier post?&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; :quest: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;UM:&lt;/SPAN&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;9.5.3.6 GPIO masked port pin registers&lt;BR /&gt;These registers are similar to the PORT registers, except that the value read is masked by ANDing with the inverted contents of the corresponding MASK register, and writing to one of these registers[color=#f00]&lt;STRONG&gt; only affects output register bits that are enabled by zeros in the corresponding MASK register.&lt;/STRONG&gt;[/color]&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You are setting MASK register bits, so as result writing to mask port doesn't change the output&amp;nbsp; :((&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sample to change masked bits 2,3,6,8,9 of port 0:&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
 Chip_GPIO_Init(LPC_GPIO_PORT);

 Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 2, (IOCON_FUNC0));
 Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 3, (IOCON_FUNC0));
 Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 6, (IOCON_FUNC0));
 Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 8, (IOCON_FUNC0));
 Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 9, (IOCON_FUNC0));

 //Chip_GPIO_SetPortDIROutput(LPC_GPIO_PORT, 0, 0xFC);
 LPC_GPIO_PORT-&amp;gt;DIR[0] |= 0xFFC;

 Chip_GPIO_SetPortMask(LPC_GPIO_PORT, 0, [color=#f00]&lt;STRONG&gt;~&lt;/STRONG&gt;[/color]((1&amp;lt;&amp;lt;2)|(1&amp;lt;&amp;lt;3)|(1&amp;lt;&amp;lt;6)|(1&amp;lt;&amp;lt;8)|(1&amp;lt;&amp;lt;9)));

 while(1)
 {
&amp;nbsp; Chip_GPIO_SetMaskedPortValue(LPC_GPIO_PORT, 0, 0XFFF);
&amp;nbsp; Chip_GPIO_SetMaskedPortValue(LPC_GPIO_PORT, 0, 0X000);
&amp;nbsp; i++;
 }
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note: Chip_GPIO_SetPortDIROutput isn't working correctly...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:59:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Help-with-GPIO-for-new-user/m-p/525877#M8513</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Help with GPIO for new user</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Help-with-GPIO-for-new-user/m-p/525878#M8514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by starblue on Tue Mar 03 01:42:07 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;&lt;SPAN&gt;Quote: &lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:cthvx8@hotmail.com"&gt;cthvx8@hotmail.com&lt;/A&gt;&lt;/STRONG&gt;&lt;BR /&gt;But I still couldn't get the expected behaviour when I used the "Chip_GPIO_SetMaskedPortValue" function.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You would use the "masked" function or register only under special circumstances, if you want to atomically set a subsets of the port bits to a value that may contain both zeros and ones.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to set only ones or only zeros atomically there are the SET and CLR registers, respectively (and probably corresponding Chip_GPIO_ functions).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;BTW, I also find the use of the inverted mask counterintuitive.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:59:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Help-with-GPIO-for-new-user/m-p/525878#M8514</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: Help with GPIO for new user</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Help-with-GPIO-for-new-user/m-p/525879#M8515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by kabirbansod on Tue Jun 16 13:19:57 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to blink leds, here is how i set up the functions:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#include "LPC13Uxx.h"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#include "gpio.h"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;void leds_arch_init(void) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GPIOSetDir( PORT1,14, 1 );&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GPIOSetDir( PORT1,13, 1 );&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;void leds_arch_set(unsigned char leds) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if(leds &amp;amp; LEDS_GREEN) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GPIOSetBitValue( 1,13, 1 );&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;} else {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GPIOSetBitValue( 1,13, 0 );&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if(leds &amp;amp; LEDS_YELLOW) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GPIOSetBitValue( 1,14, 1 );&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;} else {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GPIOSetBitValue( 1,14, 0 );&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When i try to turn of the LEDs, it doesnt work! What am i doing wrong? While debugging the GPIOSetBitValue() does get called but nothing happens it just goes past " LPC_GPIO-&amp;gt;CLR[portNum] = ..."&amp;nbsp; without turning the LED off.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:59:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Help-with-GPIO-for-new-user/m-p/525879#M8515</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: Help with GPIO for new user</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Help-with-GPIO-for-new-user/m-p/525880#M8516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by R2D2 on Tue Jun 16 13:42:30 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: kabirbansod&lt;/STRONG&gt;&lt;BR /&gt;What am i doing wrong?&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You are posting code snippets ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:59:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Help-with-GPIO-for-new-user/m-p/525880#M8516</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Help with GPIO for new user</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Help-with-GPIO-for-new-user/m-p/525881#M8517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by kabirbansod on Wed Jun 17 00:54:40 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Never mind, it was actually because there was my delay function was not working, the leds were not toggling!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:59:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Help-with-GPIO-for-new-user/m-p/525881#M8517</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: Help with GPIO for new user</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Help-with-GPIO-for-new-user/m-p/525882#M8518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by starblue on Wed Jun 17 01:07:41 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hint: Before you hijack an old thread you should at least read all the previous replies ...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:59:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Help-with-GPIO-for-new-user/m-p/525882#M8518</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:59:09Z</dc:date>
    </item>
  </channel>
</rss>

