<?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>Custom board with nrf9160 and RGB led (WS2812B)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/102933/custom-board-with-nrf9160-and-rgb-led-ws2812b</link><description>Hi All, 
 I am trying to test a single WS2812B led wired to the GPIO 3 of my nrf9160 custom board (designed by someone else), I would like to use the PWM driver as I am unable to build the led_ws2812 sample since the nrf9160 is not supported. 
 Here it</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 28 Aug 2023 07:30:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/102933/custom-board-with-nrf9160-and-rgb-led-ws2812b" /><item><title>RE: Custom board with nrf9160 and RGB led (WS2812B)</title><link>https://devzone.nordicsemi.com/thread/443293?ContentTypeID=1</link><pubDate>Mon, 28 Aug 2023 07:30:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:155de733-3b7d-4b1e-8f1a-4628d5ac0ba4</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi ax_shepherd,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It&amp;#39;s great to know that everything has worked now. Please feel free to close this thread at your convenience &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom board with nrf9160 and RGB led (WS2812B)</title><link>https://devzone.nordicsemi.com/thread/443260?ContentTypeID=1</link><pubDate>Mon, 28 Aug 2023 00:42:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cbba4248-66d0-45f5-8fbc-d713f042f003</guid><dc:creator>ax_shepherd</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;/p&gt;
&lt;p&gt;I manage to make it work by following the tutorial&amp;nbsp;&lt;a href="https://youtu.be/KSivO9Cf1TE?feature=shared&amp;amp;t=906"&gt;here&lt;/a&gt;&amp;nbsp;to create a working template for my nrf9160 based custom board. And I used the MOSI pin of the arduino_spi to drive the WS2812 based on this &lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/v3.3.99-ncs1-1/samples/drivers/led_ws2812"&gt;sample&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;nrf9160vs_nrf9160.overlay&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;lt;zephyr/dt-bindings/led/led.h&amp;gt;

#include &amp;quot;nrf52-bindings.h&amp;quot;

&amp;amp;arduino_spi { /* MOSI on D11 / P0.23 */
	compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
	led_strip: ws2812@0 {
		compatible = &amp;quot;worldsemi,ws2812-spi&amp;quot;;

		/* SPI */
		reg = &amp;lt;0&amp;gt;; /* ignored, but necessary for SPI bindings */
		spi-max-frequency = &amp;lt;SPI_FREQ&amp;gt;;

		/* WS2812 */
		chain-length = &amp;lt;1&amp;gt;; /* arbitrary; change at will */
		color-mapping = &amp;lt;LED_COLOR_ID_GREEN
				 LED_COLOR_ID_RED
				 LED_COLOR_ID_BLUE&amp;gt;;
		spi-one-frame = &amp;lt;ONE_FRAME&amp;gt;;
		spi-zero-frame = &amp;lt;ZERO_FRAME&amp;gt;;
	};
};&lt;/pre&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom board with nrf9160 and RGB led (WS2812B)</title><link>https://devzone.nordicsemi.com/thread/441967?ContentTypeID=1</link><pubDate>Thu, 17 Aug 2023 22:50:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:494b440a-b364-4831-88d0-df3e4c248185</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi ax_shepherd,&lt;/p&gt;
&lt;p&gt;Thank you for the detailed information.&lt;/p&gt;
&lt;p&gt;I think you&amp;nbsp;might have&amp;nbsp;misunderstood how the WS2812 LED works.&amp;nbsp;It is&amp;nbsp;a chainable/scalable LED that is controlled using a 1-wire interface, not via regular PWM.&lt;/p&gt;
&lt;p&gt;I think you can still use the led_ws2812 as a base. It demonstrates the WS2812 Driver usage on two&amp;nbsp;nRF52832 boards, &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;thingy52_nrf52832&lt;/span&gt;, and &lt;span style="font-family:&amp;#39;comic sans ms&amp;#39;, &amp;#39;comic sans&amp;#39;, sans-serif;"&gt;nrf52832dk_nrf52832&lt;/span&gt;. The WS2812 Driver implements the 1-wire interface of the LED&amp;nbsp;using the I2S&amp;nbsp;or SPI peripherals of the nRF52832.&lt;/p&gt;
&lt;p&gt;The sample shows how to setup the I2S version of the driver with the &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;thingy52&lt;/span&gt; board, and the SPI version with the &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;nrf52dk&lt;/span&gt; board. You will need to choose one of the two approaches, and replicate it for the nRF9160.&lt;/p&gt;
&lt;p&gt;Secondly, in your design, the nRF9160 logic level is 3.3V, while the WS2812&amp;nbsp;input is specified at 5V. Some online discussions I found suggests that it might still work, but please&amp;nbsp;pay attention to this.&lt;/p&gt;
&lt;p&gt;Thirdly, also in your design, the WS2812 is powered by VCC 3.3V. Just like above, some online discussions suggest that it would still work, but with&amp;nbsp;bad color correctness.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>