I would like RGB LED chip WS2812B used as a signal LED and thus seeking what the easiest way over 1Wire bus WS2812B set basic colors with one or two LEDs. This approach me for one LED comes complicated mikrocontroller.bplaced.net/.../
A simple idea?
If you know at STM32F1 have the minimum configuration SPI two pin, clock and data. UART is possible configure as 1Wire transmit, unfortunately inverse UART for driving WS2812B need 7 bit UART mode 1start bit + 7 data bit + 1 stop bit = 9 bit, 24bit for W2812B *3bit ( 3UARTbit per one W2812B bit) 72/9 = 8byte per setting W2812B. STM32F1 have only 8 or 9bit mode (I thing).
All that just makes me glad I chose the LPC812 for these small projects. I did originally consider ST, but have been bitten with their sudden removal of products too many times.
It is trivial to bit-bang both I2C and SPI master, as long as the thread/main loop performing it can allow the additional time it takes.
But prio 1 when selecting a processor is to first have figured out all needs and select a processor that well fits the requirements. Saving $0.30 on a too small processor tends to come back and haunt.
It is trivial to bit-bang both I2C and SPI master
The WS2812B is neither I2C nor SPI; but with SPI being so versatile, it can be used quite admirably with this device (with a couple of minor gotchas).
One point concerning the device that is worth noting. There are a number of articles concerning the required high accuracy of timing kicking around the internet. There are relatively few which mention that the timing is really not as tight as a reader might first think. I've found a few of the latter ones to to be quite persuasive in their reasoning and well worth considering.
It is a frequent requirement to first take a processor one is familiar with and experimenting with external devices that are being considered for a project. Hence my mention of the LPC812. I find it great for finding my way around the ever increasing number of boards now freely (and cheaply) available on line. Then, having better knowledge of what is really required I can go on the hunt for the most suitable real processor.
This specific protocol is fast for using interrupts for each I/O pin toggle. But it is still so slow that it isn't fun to turn off interrupts while busy-waiting - especially when the number of chained LED:s is high, since all bits has to be sent out in a sequence to control the last LED in the chain.
So SPI with FIFO or DMA would be the optimal hardware-acceleration. SPI is lovely to hardware-accelerate a number of serial protocols.
SPI is lovely to hardware-accelerate a number of serial protocols.
At the risk of making this thread sound like an SPI love-fest, I have to say that I totally agree.
Hello is it the same for the ws2813 leds? www.led-color.com/.../WS2813 LED.pdf I am not sure the ws2813 could share the same controlling code as ws2812!!