<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Setting GPIO pin as output pin</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/24306/setting-gpio-pin-as-output-pin</link><description>I am using nrf51822 DK. How to set GPIO pins as output pins and access the pins to set or reset the output.For example if I want to use pin 20 as output, how to configure that.I need the code syntax to do that. Can you please point out to any examples</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 27 Nov 2019 12:02:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/24306/setting-gpio-pin-as-output-pin" /><item><title>RE: Setting GPIO pin as output pin</title><link>https://devzone.nordicsemi.com/thread/222330?ContentTypeID=1</link><pubDate>Wed, 27 Nov 2019 12:02:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4bf049d-4fd5-48a9-bc67-af35ff3d720c</guid><dc:creator>diya</dc:creator><description>&lt;p&gt;hii sir ,&lt;/p&gt;
&lt;p&gt;what header file have to be included in the application in order to use the nrf_gpio_pin_read(pin_number) function .&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting GPIO pin as output pin</title><link>https://devzone.nordicsemi.com/thread/222319?ContentTypeID=1</link><pubDate>Wed, 27 Nov 2019 11:23:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32928068-60a5-4d5e-986e-f63e375dd9fd</guid><dc:creator>diya</dc:creator><description>&lt;p&gt;Hii Amunyela, where did you find this header file nrf_gpio.h file?can you share the link or document it will be helpful?&lt;br /&gt;please do reply fast.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting GPIO pin as output pin</title><link>https://devzone.nordicsemi.com/thread/203724?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2019 06:39:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd68d783-3514-498f-bfa0-1c75afcf402b</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;You can find all the information you need in our infocenter:&amp;nbsp;&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.3.0/group__nrf__gpio.html?resultof=%22%6e%72%66%5f%67%70%69%6f%5f%70%69%6e%5f%63%6c%65%61%72%22%20"&gt;GPIO Abstraction&amp;nbsp;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting GPIO pin as output pin</title><link>https://devzone.nordicsemi.com/thread/203672?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2019 16:50:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e745f2b-28c0-4dc7-a2e6-b661c67f9649</guid><dc:creator>LamekAmunyela</dc:creator><description>&lt;p&gt;I found some of these Instruction in&amp;nbsp;nrf_gpio.h file sorry.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting GPIO pin as output pin</title><link>https://devzone.nordicsemi.com/thread/203529?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2019 10:34:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2bfa75a1-2cdf-4ca1-bae0-4abe3b0d159d</guid><dc:creator>LamekAmunyela</dc:creator><description>&lt;p&gt;Hi Joakim, where did you get these instruction from? If there a manual/documentation for these? A link to that will be great man. Thank you very much!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting GPIO pin as output pin</title><link>https://devzone.nordicsemi.com/thread/95688?ContentTypeID=1</link><pubDate>Mon, 14 Aug 2017 12:03:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6503e78-e4fa-4709-a64c-e0a2f4623ffd</guid><dc:creator>Nikhil</dc:creator><description>&lt;p&gt;Thank you  Joakim.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting GPIO pin as output pin</title><link>https://devzone.nordicsemi.com/thread/95687?ContentTypeID=1</link><pubDate>Mon, 14 Aug 2017 09:31:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86e99e8d-ac74-4220-b36f-65a5d9609777</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Hi Nikhil!&lt;/p&gt;
&lt;p&gt;As endnode said in his answer, the blinky example is a good place to start.&lt;/p&gt;
&lt;p&gt;In my opinion the easiest way to control the LED is to use the nrf_gpio interface directly.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Configuring a pin as output:  &lt;code&gt;nrf_gpio_cfg_pin_output(pin_number);&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Turn on/off the led: &lt;code&gt;nrf_gpio_pin_set(pin_number);&lt;/code&gt; / &lt;code&gt;nrf_gpio_pin_clear(pin_number);&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;Toggle the LED: &lt;code&gt;nrf_gpio_pin_toggle(pin_number);&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Which pin that is connected to the different LEDs, you can find in the product specification, or on the backside of your nRF51 DK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting GPIO pin as output pin</title><link>https://devzone.nordicsemi.com/thread/95689?ContentTypeID=1</link><pubDate>Sun, 13 Aug 2017 20:19:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d56f3986-cea5-417e-a9a7-a3154e9cf8d2</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;You are probably looking for &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.3.0/gpio_example.html?cp=4_0_3_4_5_1"&gt;LED blinky example in SDK v12.3.0&lt;/a&gt; (the newest which supports nRF51 chips).&lt;/p&gt;
&lt;p&gt;(As this is pretty basic example mentioned in every beginners&amp;#39; tutorial one would wonder how long have you tried to solve your question yourself before posting to the forum;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>