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?
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!!