×

SparkFun Electronics will be closed in observance of memorial day on Monday, May 29th. We will resume normal business hours on Tuesday, May 30th. Any orders placed after 2pm Mountain Time on Friday, May 26th will process and ship out on Tuesday, May 30th.

Member #43977

Member Since: July 22, 2008

Country: United States

  • There seems to be a way to control the WS2812 RGB LEDs without doing bit-banging at all. I found a post on the NXP (former Philips) Semiconductors microcontroller forum where they discuss NXP’s low end ARM M0+ LPC810 device operating a chain of WS2812s using the SPI and what NXP calls the SCT - .State Configurable Timer. The SCT is “listening” to master configured SPI’s SCK and MOSI signals and generates needed code 0/1 waveform(s). Running at 12 MHz this micro spends no more than 25% of its horsepower servicing the SPI interrupts.

    To me the fact that feeding data to the WS2812 LEDs can be as simple as taking care of a SPI master while having at least of ¾ of processing power left for something else is borderline awesome!:-). Seeing the code from the demo I would say that at 24 MHz this micro would have close to 90% of CPU processing power available for non-WS2812 tasks…

    Not to mention that contrary to bit-banging where choice of instructions and system frequency is a tricky task to say the least (good luck changing operating frequency from x MHz to y MHz and having a working waveform…) the SPI and SCT combo appear to operate flawlessly regardless of the micro’s speed.

    More details on “how-to”, including the code, scope screenshots and videos at:

    http://www.lpcware.com/content/forum/controlling-ws2812-led-strips-lpc810

No public wish lists :(