Comments (2)
Hi,
Yes, indeed, one could use a SPI peripheral to emulate the WS2812 protocol as you describe. There are also some examples out there that do this on an AVR. On slower MCUs, and especially with out DMA, there is not a lot of benefit of using SPI, compared to bitbanging, because the CPU is basically busy all the time waiting to feed the SPI register.
On 32 bit MCUs, SPI+DMA is usually the best way to implement the WS2812 protocol. There are also many other approaches, using programme periphery. I especially like the PIO in the new RP2040.
from light_ws2812.
I should have done more investigation about WS LED's - you blog article about WS timing is now 8 years old, and - as you just wrote - other solutions were devised in the meantime. Your blog article about WS LEDS is still one of the first on the list from google search though, and rightfully so as it has plenty of interesting info. Maybe it's time to write the 3rd blog article listing other implementation approaches. One of the person on the blog's discussion mentioned PWM, which is also interesting idea. I found the blog discussion after I raised this github 'issue', one person also mentioned SPI (without further details) .
Thanks for the answer and for sharing your research.
from light_ws2812.
Related Issues (20)
- Blink example works for when LED(112) or smaller but not larger. HOT 2
- inline assembly not recognized HOT 2
- undefined reference to `__heap_end' HOT 3
- expected ")" error in keil HOT 1
- Need help HOT 5
- 3 lights turn on at a time when it should be just 1 pixel
- Impossible constraint in 'asm' HOT 6
- new release planned?
- Cant change the color but the led count HOT 1
- AVR Attiny2313. Limit 41 LEDs HOT 1
- Licensing of your code HOT 2
- Operation with SAMD11? HOT 1
- WS2812B with BeagleBone Black HOT 2
- Unable to use light_ws2812 with USBMIDI HOT 8
- ARM Cortex M0 Setup Problems
- it disables the planned interrupt requests HOT 1
- EFM8 support? HOT 1
- Compile error: DDRB is not declared (AVR) HOT 14
- Void zip file HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from light_ws2812.