# What's the name of signal encoding used by WS2812 LEDs? [duplicate]

The WS2812b color LED uses some kind of duty cycle encoding to encode three states:

• one
• zero
• reset

This can be seen in the following figure:

What's the name of the used encoding?

It's not classic Pulse Width Modulation (PWM).

Edit:
While this question What encoding is used in this signal? asks for a name of a similar modulation, it does not give a name for the modulation.

• Looks to be just a made up one. Not unusual to have a sync pattern then some data. You see similar ones used elsewhere, not having a global name either. – old_timer Nov 25 '18 at 19:47

AFAIK it doesn't have a fixed name, apart from 'the WS2812 protocol'. As described, it is a fixed-cell pulse-width encoding.

FYI: in practice, it isn't fixed-cell at all: provided that the pauses (T1L, T0L) are shorter than Treset, all that matters is the pulse width (T0H, T1H). This makes it a plain pulse-wdith encoding, and it makes bit-banging waaaaay easier.

• This looks like a variant of 1-wire protocol encoding scheme, also referred as "PWM", in this case it looks like 33/66% PWM. The protocol was invented by Dallas Semiconductor, now a part of MAXIM. home.roboticlab.eu/en/examples/sensor/1-wire – Ale..chenski Nov 25 '18 at 20:36
• I don't see what this unidirectional protocol has to do with the bi-directional dallas/maxim 1-wire protocol. And IMO PWM is a strange term to describe this protocol, because it isn't a Modulation, it is an Encoding. So yes, it is a pulse-width encodong, just like 1-wire, and dozens of others. – Wouter van Ooijen Nov 25 '18 at 20:44

This is what World-Semi calls it, they make the WS2812B

The data transfer protocol use single NZR communication mode. After the pixel power-on reset, the DIN port receive data from controller, the first pixel collect initial 24bit data then sent to the internal data latch, the other data which reshaping by the internal signal reshaping amplification circuit sent to the next cascade pixel through the DO port. After transmission for each pixel，the signal to reduce 24bit. pixel adopt auto resha -ping transmit technology, making the pixel cascade number is not limited the signal transmission, only depend on the speed of signal transmission.

• This does not answer my question. I asked for the signal modulation name, but not how communication works. – Paebbels Nov 26 '18 at 0:36
• The question was "What's the name of the used encoding?" The manufacturer calls it "single NZR communication mode". I think that does answer the question. – CrossRoads Nov 26 '18 at 1:36
• I get your point, but I believe this is a typo. There is no NZR code (according to Google), but NRZ (Non-Return to Zero`). NRZ is a general term and the basis for many codes. – Paebbels Nov 26 '18 at 8:32
• Next suggestion would be to browse the Adafruit Neopixel library of the FastLED.h library and see if they call it something else. – CrossRoads Nov 26 '18 at 15:27