WS2812B
WS2812B is a control circuit and serial protocol used for controlling LEDs (usually in a strip). It requires only a single wire for data transfer in addition to power (5V) and ground. Each LED is addressable using this protocol as well.
Protocol
Because it uses a single wire, communication is done serially one bit at a time. 24 bits of data is sent for each LED (GRB) in the circuit followed by a reset code. Each circuit consumes the first 24 bits it receives and passes the rest of the data along the line.
This is a timed protocol: each bit takes 1.25 μs to transfer. For both 0 and 1, the line is driven high, then low for differing amounts of time to distinguish the two. Additionally, there is a RESET code where the line is low for a certain amount of time.
Symbol | Time | Tolerance |
---|---|---|
T0H | 0.4 μs | ± 150 ns |
T0L | 0.85 μs | ± 150 ns |
T1H | 0.8 μs | ± 150 ns |
T1L | 0.45 μs | ± 150 ns |
Treset | > 50 μs |
Additionally, the highest bit is sent first (B7, B6, B5, B4, B3, B2, B1, B0).