<?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>Driving WS281x RGB LEDs from an nRF51822</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/702/driving-ws281x-rgb-leds-from-an-nrf51822</link><description>Hi Guys, 
 I&amp;#39;m new to using the nRF51822 environment but I&amp;#39;ve used AVRs for years, so please be gentle... 
 I&amp;#39;m wanting to drive a strip of WS2812 RGB LEDs from an nRF51822 processor. Ultimately I want to control it over BLE but initially I need to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 02 Jul 2015 11:48:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/702/driving-ws281x-rgb-leds-from-an-nrf51822" /><item><title>RE: Driving WS281x RGB LEDs from an nRF51822</title><link>https://devzone.nordicsemi.com/thread/3544?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2015 11:48:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dba1ed48-51f0-43e8-8ac6-7991c3e8fbdf</guid><dc:creator>Chris Bick</dc:creator><description>&lt;p&gt;If you&amp;#39;re looking to use the RedBear &lt;a href="http://redbearlab.com/redbearlab-nrf51822/"&gt;nRF51822&lt;/a&gt; or their &lt;a href="http://redbearlab.com/blenano/"&gt;Nano&lt;/a&gt; device take a look at these posts for a solution.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/lavallc/nrf51-neopixel/issues/1"&gt;github.com/.../1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://redbearlab.zendesk.com/entries/73654999-BLE-Nano-with-Neopixel-WS2812-mbed#post_%23%7Bpost.id%7D"&gt;redbearlab.zendesk.com/.../73654999-BLE-Nano-with-Neopixel-WS2812-mbed&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Driving WS281x RGB LEDs from an nRF51822</title><link>https://devzone.nordicsemi.com/thread/3543?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2013 22:55:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28110864-8e62-493a-a83d-8589ce535bd6</guid><dc:creator>Eric Salem</dc:creator><description>&lt;p&gt;See:&lt;/p&gt;
&lt;p&gt;devzone.nordicsemi.com/index.php/lava-ws2812-b-neopixel-library&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Driving WS281x RGB LEDs from an nRF51822</title><link>https://devzone.nordicsemi.com/thread/3542?ContentTypeID=1</link><pubDate>Thu, 07 Nov 2013 03:15:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d14368af-e241-44f8-ae64-ad4707b47853</guid><dc:creator>Alex Shepherd</dc:creator><description>&lt;p&gt;Hi Eric,&lt;/p&gt;
&lt;p&gt;Any update on releasing the WS281x source code?&lt;/p&gt;
&lt;p&gt;Alex&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Driving WS281x RGB LEDs from an nRF51822</title><link>https://devzone.nordicsemi.com/thread/3541?ContentTypeID=1</link><pubDate>Wed, 30 Oct 2013 23:25:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:50125fef-57ad-44db-85eb-2b61b94a9e93</guid><dc:creator>Eric Salem</dc:creator><description>&lt;p&gt;I don&amp;#39;t have the final say on what happens to the code I write, but I believe our intentions are to release the c library for the WS281x on Github after more review of today&amp;#39;s code changes. This would most likely happen within the next several days.&lt;/p&gt;
&lt;p&gt;I will message both of you with more details later.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Driving WS281x RGB LEDs from an nRF51822</title><link>https://devzone.nordicsemi.com/thread/3540?ContentTypeID=1</link><pubDate>Wed, 30 Oct 2013 22:20:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16f412b5-5c64-4bf2-b29c-4b9419cba059</guid><dc:creator>Marc Nicholas</dc:creator><description>&lt;p&gt;Are you able to share the code? A little late for Halloween this year, but there&amp;#39;s always next year ;)&lt;/p&gt;
&lt;p&gt;-m&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Driving WS281x RGB LEDs from an nRF51822</title><link>https://devzone.nordicsemi.com/thread/3539?ContentTypeID=1</link><pubDate>Wed, 30 Oct 2013 20:21:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44548c3a-c947-40d7-8ca8-7089ab26cb1b</guid><dc:creator>Alex Shepherd</dc:creator><description>&lt;p&gt;Excellent - that&amp;#39;s encouraging. The Nordic Tech guys confirmed that this approach should work well and your observations so far agree with this, which is good.&lt;/p&gt;
&lt;p&gt;Alex&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Driving WS281x RGB LEDs from an nRF51822</title><link>https://devzone.nordicsemi.com/thread/3538?ContentTypeID=1</link><pubDate>Wed, 30 Oct 2013 17:24:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c05dbe45-b233-45bd-9c32-165946266188</guid><dc:creator>Eric Salem</dc:creator><description>&lt;p&gt;Great news! Thanks to your information about the Radio Events, info in the S110 doc, and the ble_radio_notification.c file I was able to successfully run my WS2812 driver library during the Radio quiet time. So far it has been working flawlessly!&lt;/p&gt;
&lt;p&gt;Take a look at the heart rate sensor app to see how ble_radio_notification is implemented.&lt;/p&gt;
&lt;p&gt;Thanks for the help Alex.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Driving WS281x RGB LEDs from an nRF51822</title><link>https://devzone.nordicsemi.com/thread/3533?ContentTypeID=1</link><pubDate>Wed, 30 Oct 2013 02:45:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61ce7d9d-fc4d-42c1-8051-4730bc7c1da4</guid><dc:creator>Alex Shepherd</dc:creator><description>&lt;p&gt;There is some discussion about this in Section 9 &amp;quot;Radio Notification&amp;quot; in the S110_SoftDevice_Specification v1.1.pdf document here: &lt;a target="_blank" href="https://www.nordicsemi.com/eng/content/download/13238/213065/file/S110_SoftDevice_Specification" rel="nofollow"&gt;https://www.nordicsemi.com/eng/content/download/13238/213065/file/S110_SoftDevice_Specification&lt;/a&gt;%20v1.1.pdf&lt;/p&gt;
&lt;p&gt;However I&amp;#39;ve not seen any examples of registering and handling the notifications. I&amp;#39;ll lodge a support request.&lt;/p&gt;
&lt;p&gt;My thoughts were to register a nACTIVE handler and then do my WS281x operation immediately after the nACTIVE notification as the BLE Stack should be quiet for a few ms after that notification - I&amp;#39;m hoping... ;)&lt;/p&gt;
&lt;p&gt;Alex&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Driving WS281x RGB LEDs from an nRF51822</title><link>https://devzone.nordicsemi.com/thread/3532?ContentTypeID=1</link><pubDate>Tue, 29 Oct 2013 18:08:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:513cbea8-3cba-4eb3-8b16-17cc98f7a953</guid><dc:creator>Eric Salem</dc:creator><description>&lt;p&gt;I wrote the library in C, but the timed outputs uses inline assembly calls. I have continued testing this library because I felt I hadn&amp;#39;t thoroughly tested it with BLE. I have found that indeed the softdevice interrupts cause an issue with the specific LED timing. Since, I have spent bits of time here and there looking for alternatives. I have been preparing a timer+gpiote program, but do not have my oscilloscope today to test it.&lt;/p&gt;
&lt;p&gt;You mentioned below about Radio Notification windows. Do you have a link to the documentation on this or is there an example program that shows this functionality working?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Driving WS281x RGB LEDs from an nRF51822</title><link>https://devzone.nordicsemi.com/thread/3531?ContentTypeID=1</link><pubDate>Sun, 27 Oct 2013 08:44:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75947c4a-0c77-46fa-9fcd-86a109b73b78</guid><dc:creator>Alex Shepherd</dc:creator><description>&lt;p&gt;Did you code it in C or Assembler?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Driving WS281x RGB LEDs from an nRF51822</title><link>https://devzone.nordicsemi.com/thread/3537?ContentTypeID=1</link><pubDate>Thu, 24 Oct 2013 21:25:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0686afa6-190c-44ab-a7d1-fba25237af4d</guid><dc:creator>Alex Shepherd</dc:creator><description>&lt;p&gt;Hi John, thanks for the feedback and directing my attention to the PWM + SD example. That looks to do most of what I want so hopefully I can tweak it to work for me.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Alex Shepherd&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Driving WS281x RGB LEDs from an nRF51822</title><link>https://devzone.nordicsemi.com/thread/3536?ContentTypeID=1</link><pubDate>Thu, 24 Oct 2013 13:25:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de3b7451-3c02-41dc-bfc9-b8777301f7eb</guid><dc:creator>John Kelley</dc:creator><description>&lt;p&gt;It should be doable with Timer Compare regs + GPIOTE, look at the PWM sample code here on devzone for something to model it after so you don&amp;#39;t need to do any polling. I would take the approach of using PPI to drive GPIOTE off one Timer Compare reg and use another Compare with the same CC value to setup the next bit for transmission.&lt;/p&gt;
&lt;p&gt;Also, there is some neat but mostly inapplicable code (as far as nRF51822 is concerned) for driving WS2811s at &lt;a href="https://github.com/scanlime/fadecandy/"&gt;github.com/.../&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Driving WS281x RGB LEDs from an nRF51822</title><link>https://devzone.nordicsemi.com/thread/3535?ContentTypeID=1</link><pubDate>Wed, 23 Oct 2013 21:20:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a2fb7a4-81fd-456c-bbc2-c50d4b6a4fdd</guid><dc:creator>Alex Shepherd</dc:creator><description>&lt;p&gt;Hi Eric,
Thanks for the feedback and good to know that it is possible.&lt;/p&gt;
&lt;p&gt;The response from the Nordic Tech Support guys suggests that there is up to 7.5ms periods of time where there is no interrupt activity going on and that by using the &amp;quot;Radio Notifications&amp;quot; facility provided by the SoftDevice I should be able to figure out a &amp;quot;quiet time&amp;quot; to bit-bash the WS281x waveform. I need to drive about 60 nodes so that will take 60 x 25us = 1.5ms to clock out.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m thinking of using the Timer and Compare Registers + GPIOTE capability and poll the Timer state in a tight loop to adjust the ON -&amp;gt; OFF transition time to do the O or 1 bit encoding.&lt;/p&gt;
&lt;p&gt;Alex&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Driving WS281x RGB LEDs from an nRF51822</title><link>https://devzone.nordicsemi.com/thread/3530?ContentTypeID=1</link><pubDate>Wed, 23 Oct 2013 21:09:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd09d865-e0d6-4913-8e8d-b426ea7b606d</guid><dc:creator>Bastiaan</dc:creator><description>&lt;p&gt;Ran a quick and simple test using the UART ble program to turn on a new LED at red for each serial packet collected and to turn off all LEDs on a write from the phone to the characteristic. Seems to run regardless of the softdevice running.&lt;/p&gt;
&lt;p&gt;I have read into that makeshift SPI setup and seen the Teensy library, but again decided to implement my own NOP based library.&lt;/p&gt;
&lt;p&gt;Sorry that I am not capable of sharing the code at this time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Driving WS281x RGB LEDs from an nRF51822</title><link>https://devzone.nordicsemi.com/thread/3534?ContentTypeID=1</link><pubDate>Wed, 23 Oct 2013 21:09:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:758ce357-4800-4d0a-8481-e5fb8c3363fd</guid><dc:creator>Guest</dc:creator><description>&lt;p&gt;Ran a quick and simple test using the UART ble program to turn on a new LED at red for each serial packet collected and to turn off all LEDs on a write from the phone to the characteristic. Seems to run regardless of the softdevice running.&lt;/p&gt;
&lt;p&gt;I have read into that makeshift SPI setup and seen the Teensy library, but again decided to implement my own NOP based library.&lt;/p&gt;
&lt;p&gt;Sorry that I am not capable of sharing the code at this time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Driving WS281x RGB LEDs from an nRF51822</title><link>https://devzone.nordicsemi.com/thread/3529?ContentTypeID=1</link><pubDate>Wed, 23 Oct 2013 20:46:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0efd810-f402-4f7c-ab3e-13be6220ebdd</guid><dc:creator>Eric Salem</dc:creator><description>&lt;p&gt;I have implemented a library specifically for controlling these WS281x&amp;#39;s using NOP calls timed to work. However, I have not tested it with the softdevice enabled and have only tried up to 4 parallel strips of 10 LED&amp;#39;s each.&lt;/p&gt;
&lt;p&gt;Will report back after testing with softdevice.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Driving WS281x RGB LEDs from an nRF51822</title><link>https://devzone.nordicsemi.com/thread/3528?ContentTypeID=1</link><pubDate>Wed, 23 Oct 2013 11:17:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2913730c-f402-47e9-ad22-5923561eb3dd</guid><dc:creator>Alex Shepherd</dc:creator><description>&lt;p&gt;Yeah, I&amp;#39;ve looked at this for hours and the SPI only has a fixed selection of bit rates and the BLE SoftDevice adds too much interrupt latency to be able to get around and refresh Timer Compare regs in time.&lt;/p&gt;
&lt;p&gt;So I think I&amp;#39;ll have to add an additional CPU (AVR ATTiny85 probably) to drive these LEDs.&lt;/p&gt;
&lt;p&gt;Alex&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Driving WS281x RGB LEDs from an nRF51822</title><link>https://devzone.nordicsemi.com/thread/3526?ContentTypeID=1</link><pubDate>Wed, 23 Oct 2013 02:54:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8374da4f-b94f-434e-8017-cd6a0519bfa3</guid><dc:creator>Marc Nicholas</dc:creator><description>&lt;p&gt;From what I recall, this controller is like a big shift register and you shift you last pixel out of the MCU into the first physical pixel which shifts it into the next one etc. etc.&lt;/p&gt;
&lt;p&gt;I seem to recall timing issues and that you might have to constantly refresh the data stream?&lt;/p&gt;
&lt;p&gt;Just thinking out loud: I wonder if PPI could help out here?&lt;/p&gt;
&lt;p&gt;-m&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Driving WS281x RGB LEDs from an nRF51822</title><link>https://devzone.nordicsemi.com/thread/3527?ContentTypeID=1</link><pubDate>Tue, 22 Oct 2013 14:34:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e742d1e4-072c-47d2-a67a-c90c7bab9c36</guid><dc:creator>Ling LI</dc:creator><description>&lt;p&gt;Yeah the EasyDMA is for the RADIO block, not accessable from user code.&lt;/p&gt;
&lt;p&gt;I have no experience with this serial protocol (of unnecessarily high speed and weired custom timing). I guess the SPI solution you mentioned might be a suitable choice for nRF51. Concerning CPU overhead, let&amp;#39;s hope the controller doesn&amp;#39;t need constant control signal under stable conditions i.e., having internal latch/memory to keep the state. Otherwiese it&amp;#39;s too bad; you may need a small AVR dedicated to this uninteresting, busy task.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>