当前位置:网站首页>Stm32f1 and stm32cubeide programming examples -ws2812b full color LED driver (based on spi+dma)

Stm32f1 and stm32cubeide programming examples -ws2812b full color LED driver (based on spi+dma)

2022-06-24 14:27:00 Visual intelligence

WS2812B Full color LED drive ( be based on SPI+DMA)

1、WS2812 Introduce

WS2812/WS2812B LED Use 24 Bits to indicate green 、 Red and blue values .

 Insert picture description here

WS2812 Design with single line communication , The communication protocol is non return to zero coding , Every LED need 24 individual bit The data of , The data goes through a series of LED when , first LED Intercept the beginning of the data 24bit, And pass the rest of the data to the next LED, And so on . Bits on the data line are encoded by high pulses , Then there is the low pulse . The sequence is as follows :

 Insert picture description here

WS2812 It supports high-speed data transmission and its data transmission timing is the same as that of SPI The communication sequence is similar , So you can use STM32 Of SPI Peripheral simulation WS2812 Communication timing .

In the previous article , Yes WS2812 Made a detailed introduction , Please refer to :

原网站

版权声明
本文为[Visual intelligence]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/175/202206241241263062.html