<?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>use one PWM drive multi IOs</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18515/use-one-pwm-drive-multi-ios</link><description>We want to use 52832 to control 6 LEDs. it is easy to use 6 IO pins to make them on and off. but we need these LED to blink. so we want to use one PWM module to generate 1 Hz PWM with 50% duty cycle. we need PWM output AND with the IO output control.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 22 Dec 2016 08:48:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18515/use-one-pwm-drive-multi-ios" /><item><title>RE: use one PWM drive multi IOs</title><link>https://devzone.nordicsemi.com/thread/71452?ContentTypeID=1</link><pubDate>Thu, 22 Dec 2016 08:48:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffc02349-9fda-4976-b76f-4a24fe0b2f33</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi David&lt;/p&gt;
&lt;p&gt;It sounds a bit overkill to use the PWM for such a low frequency, unless you need extremely accurate blinking.&lt;/p&gt;
&lt;p&gt;For blinking LED&amp;#39;s I would suggest using an app_timer instead, and simply toggle the LED&amp;#39;s manually from the app_timer callback.&lt;/p&gt;
&lt;p&gt;If you use the GPIO registers directly it is possible to set or clear multiple pins in a single instruction, like this:&lt;/p&gt;
&lt;p&gt;NRF_GPIO-&amp;gt;OUTSET = (1 &amp;lt;&amp;lt; pin1_num) | (1 &amp;lt;&amp;lt; pin2_num) | ... | (1 &amp;lt;&amp;lt; pinN_num);&lt;br /&gt;
NRF_GPIO-&amp;gt;OUTCLR = (1 &amp;lt;&amp;lt; pin1_num) | (1 &amp;lt;&amp;lt; pin2_num) | ... | (1 &amp;lt;&amp;lt; pinN_num);&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;
Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>