{"id":1047,"date":"2022-06-26T04:18:19","date_gmt":"2022-06-26T04:18:19","guid":{"rendered":"https:\/\/blog.embeddedexpert.io\/?p=1047"},"modified":"2022-06-26T04:18:21","modified_gmt":"2022-06-26T04:18:21","slug":"working-with-stm32-and-addressable-led-part-1-introduction","status":"publish","type":"post","link":"https:\/\/blog.embeddedexpert.io\/?p=1047","title":{"rendered":"Working with STM32 and Addressable LED part 1: Introduction"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/F68DRVWHOSC3N00.jpg\" alt=\"\" class=\"wp-image-1048\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/F68DRVWHOSC3N00.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/F68DRVWHOSC3N00-300x300.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/F68DRVWHOSC3N00-150x150.jpg 150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/F68DRVWHOSC3N00-768x768.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/F68DRVWHOSC3N00-750x750.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/F68DRVWHOSC3N00-400x400.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/F68DRVWHOSC3N00-250x250.jpg 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>In this guide, we shall see how to interface addressable LED WS2812 with STM32. We shall see how the data should be send, and how to configure STM32 to communicate with these type of LED.<\/p>\n\n\n\n<p>In this part 1, we shall cover the following<\/p>\n\n\n\n<p>In this guide, we shall cover the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>WS2812<\/li><li>Communication with WS2812.<\/li><li>Setting up STM32 core frequency<\/li><\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. WS2812:<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>WS2812 is a intelligent control LED light source that the control circuit and RGB chip are integrated in a package of 5050 components. It internal include intelligent digital port data latch and signal reshaping amplif ication drive circuit. Also include a precision internal oscillator and a 12V voltage programmable constant curre -nt control part,&nbsp;effectively ensuring&nbsp;the pixel point light color height&nbsp;consistent.<\/p>\n\n\n\n<p>The data transfer protocol use single NZR communication mode. After the pixel power-on reset, the DIN port receive data from controller, the first pixel collect initial 24bit data then sent to the internal data latch, the other data which reshaping by the internal signal reshaping amplification circuit sent to the next cascade pixel through the DO port. After transmission for each pixel\uff0cthe signal to reduce 24bit. pixel adopt auto resha -ping transmit technology, making the pixel cascade number is not limited the signal transmission, only depend<\/p>\n\n\n\n<p>on the speed of signal transmission.<br>LED with low driving voltage, environmental protection and energy saving, high brightness, scattering angl<\/p>\n\n\n\n<p>e is large, good consistency, low power, long life and other advantages. The control chip integrated in LED above becoming more simple circuit, small volume, convenient installation.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"904\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.43.39-AM-1024x904.png\" alt=\"\" class=\"wp-image-1049\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.43.39-AM-1024x904.png 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.43.39-AM-300x265.png 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.43.39-AM-768x678.png 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.43.39-AM-1536x1356.png 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.43.39-AM-2048x1808.png 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.43.39-AM-1150x1015.png 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.43.39-AM-750x662.png 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.43.39-AM-400x353.png 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.43.39-AM-250x221.png 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Absolute Maximum Ratings:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"369\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.45.16-AM-1024x369.png\" alt=\"\" class=\"wp-image-1050\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.45.16-AM-1024x369.png 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.45.16-AM-300x108.png 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.45.16-AM-768x277.png 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.45.16-AM-1536x554.png 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.45.16-AM-2048x738.png 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.45.16-AM-1150x415.png 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.45.16-AM-750x270.png 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.45.16-AM-400x144.png 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.45.16-AM-250x90.png 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>LED characteristics:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"242\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.46.26-AM-1024x242.png\" alt=\"\" class=\"wp-image-1051\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.46.26-AM-1024x242.png 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.46.26-AM-300x71.png 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.46.26-AM-768x182.png 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.46.26-AM-1536x363.png 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.46.26-AM-2048x484.png 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.46.26-AM-1150x272.png 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.46.26-AM-750x177.png 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.46.26-AM-400x95.png 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.46.26-AM-250x59.png 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. Communication with WS2812:<\/h2>\n\n\n\n<p>In order to communicate with WS2812, we need to used serial data. The serial shall be send as following:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"654\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.49.55-AM-1024x654.png\" alt=\"\" class=\"wp-image-1052\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.49.55-AM-1024x654.png 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.49.55-AM-300x192.png 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.49.55-AM-768x490.png 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.49.55-AM-1536x981.png 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.49.55-AM-2048x1307.png 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.49.55-AM-1150x734.png 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.49.55-AM-750x479.png 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.49.55-AM-400x255.png 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.49.55-AM-250x160.png 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>In order to send 0, the duration of high pulse is 1\/3rd of the pulse and to send 1, the pulse length shall be 2\/3rd of the pulse duration. To terminate the communication, the host MCU shall send low pulse for more than 50uS.<\/p>\n\n\n\n<p>Since the T0H and T0L combined shall give duration of 125uS. Hence the PWM frequency shall be 800KHz.<\/p>\n\n\n\n<p>For this to work, a DMA shall be used to update the duty cycle as fast as posssible.<\/p>\n\n\n\n<p>It is also possible to cascade multiple WS2812 LEDs together as following:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"389\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.58.37-AM-1024x389.png\" alt=\"\" class=\"wp-image-1054\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.58.37-AM-1024x389.png 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.58.37-AM-300x114.png 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.58.37-AM-768x292.png 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.58.37-AM-1150x437.png 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.58.37-AM-750x285.png 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.58.37-AM-400x152.png 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.58.37-AM-250x95.png 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-6.58.37-AM.png 1268w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>The transmission of the data shall be as following:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"669\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-7.04.43-AM-1024x669.png\" alt=\"\" class=\"wp-image-1057\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-7.04.43-AM-1024x669.png 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-7.04.43-AM-300x196.png 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-7.04.43-AM-768x501.png 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-7.04.43-AM-1536x1003.png 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-7.04.43-AM-2048x1337.png 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-7.04.43-AM-1150x751.png 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-7.04.43-AM-750x490.png 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-7.04.43-AM-400x261.png 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-7.04.43-AM-250x163.png 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>First 24-bit is for pixel 1 second 24-bit for pixel 2 and so on. The reset command is 50uS long low signal.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>The composition of the 24-bit data is as following:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"109\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-7.07.44-AM-1024x109.png\" alt=\"\" class=\"wp-image-1058\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-7.07.44-AM-1024x109.png 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-7.07.44-AM-300x32.png 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-7.07.44-AM-768x82.png 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-7.07.44-AM-1536x163.png 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-7.07.44-AM-2048x217.png 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-7.07.44-AM-1150x122.png 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-7.07.44-AM-750x80.png 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-7.07.44-AM-400x42.png 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-26-at-7.07.44-AM-250x27.png 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The data shall be send for green color first and MSB first.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3. Setting up STM32 Core frequency:<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>Since the required frequency of the PWM is 800KHz and the default frequency of STM32F4 is 16MHz, we shall boost the frequency from 16MHz to 72MHz. This will allow use to get duty cycle from 0 to 90 (0 is 0% and 90 is 100%). This will give better resolution to set the specific bit which will be 30 for 0 and 60 for 1.<\/p>\n\n\n\n<p>In order to set the core to 72MHz (taken from this earlier topic <a rel=\"noreferrer noopener\" href=\"https:\/\/blog.embeddedexpert.io\/?p=454\" data-type=\"URL\" data-id=\"https:\/\/blog.embeddedexpert.io\/?p=454\" target=\"_blank\">here<\/a>), the following code will set the core of STM32F411 to 72MHz.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">#include &quot;stm32f4xx.h&quot;                  \/\/ Device header\n\nvoid SysClockConfig(void) \/\/set the core frequency to 100MHz\n{\n#define PLL_M      4\n#define PLL_N      72\n#define PLL_P      2\n#define PLL_Q      4\n\t\n__IO uint32_t StartUpCounter = 0, HSEStatus = 0;\n  \n\n  RCC-&gt;CR |= ((uint32_t)RCC_CR_HSEON);\n \n\n  do\n  {\n    HSEStatus = RCC-&gt;CR &amp; RCC_CR_HSERDY;\n    StartUpCounter++;\n  } while((HSEStatus == 0) &amp;&amp; (StartUpCounter != 3000));\n\n  if ((RCC-&gt;CR &amp; RCC_CR_HSERDY) != RESET)\n  {\n    HSEStatus = (uint32_t)0x01;\n  }\n  else\n  {\n    HSEStatus = (uint32_t)0x00;\n  }\n\n  if (HSEStatus == (uint32_t)0x01)\n  {\n \n    RCC-&gt;APB1ENR |= RCC_APB1ENR_PWREN;\n    PWR-&gt;CR &amp;= (uint32_t)~(PWR_CR_VOS);\n\n\n    RCC-&gt;CFGR |= RCC_CFGR_HPRE_DIV1;\n      \n\n    RCC-&gt;CFGR |= RCC_CFGR_PPRE2_DIV1;\n    \n\n    RCC-&gt;CFGR |= RCC_CFGR_PPRE1_DIV2;\n\n\n    RCC-&gt;PLLCFGR = PLL_M | (PLL_N &lt;&lt; 6) | (((PLL_P &gt;&gt; 1) -1) &lt;&lt; 16) |\n                   (RCC_PLLCFGR_PLLSRC_HSE) | (PLL_Q &lt;&lt; 24);\n\n\n    RCC-&gt;CR |= RCC_CR_PLLON;\n\n    \n    while((RCC-&gt;CR &amp; RCC_CR_PLLRDY) == 0)\n    {\n    }\n   \n    \/* Configure Flash prefetch, Instruction cache, Data cache and wait state *\/\n    FLASH-&gt;ACR = FLASH_ACR_ICEN |FLASH_ACR_DCEN |FLASH_ACR_LATENCY_3WS;\n\n    \/* Select the main PLL as system clock source *\/\n    RCC-&gt;CFGR &amp;= (uint32_t)((uint32_t)~(RCC_CFGR_SW));\n    RCC-&gt;CFGR |= RCC_CFGR_SW_PLL;\n\n    \/* Wait till the main PLL is used as system clock source *\/\n    while ((RCC-&gt;CFGR &amp; (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL)\n    {;}\n  }\n  else\n  { \/* If HSE fails to start-up, the application will have wrong clock\n         configuration. User can add here some code to deal with this error *\/\n  }\n\n}<\/pre><\/div>\n\n\n\n<p>In part 2, we shall develop the driver for WS2812 and control 24 LEDs.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Happy coding \ud83d\ude42 <\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, we shall see how to interface addressable LED WS2812 with STM32. We shall see how the data should be send, and how to configure STM32 to communicate with these type of LED. In this part 1, we shall cover the following In this guide, we shall cover the following: WS2812 Communication with [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,11,12],"tags":[],"class_list":["post-1047","post","type-post","status-publish","format-standard","hentry","category-embedded-systems","category-peripheral-drivers","category-stm32"],"_links":{"self":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/1047"}],"collection":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1047"}],"version-history":[{"count":4,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/1047\/revisions"}],"predecessor-version":[{"id":1059,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/1047\/revisions\/1059"}],"wp:attachment":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1047"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1047"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1047"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}