When nCS is pulled low, each clock pulse on SCLK shifts a bit from MOSI into an internal register. The internal register length is 240 bits long (10 LEDs with 3 colors and 8 bit per color). The contents of this register are then used to generate output pulses. The output pulses encode bits of the color data. They are 1.25us in length. A pulse representing a 1 has a high-time of 800ns and an low-time of 450ns. A pulse representing a 0 has a high-time of 400ns and a low-time of 850ns. Each LED consumes 24 bits. Subsequent bits are transmitted to LEDs further on the chain. When a full transmission (Every LED has received its 24 bits of color data) has occured, a reset occurs (output goes low for >= 50 us).
Connect the LED_DATA pin to the DIN pin of a string of WS2812B LEDs. Use a microcontroller to shift in color data via the SPI Interface.
Any SPI Master (RPi, Arduino, MCU, etc.), and a String of 10 WS2812B LEDs.
# | Input | Output | Bidirectional |
---|---|---|---|
0 | MOSI | LED_DATA | |
1 | SCLK | ||
2 | nCS | ||
3 | |||
4 | |||
5 | |||
6 | |||
7 |