Skip to content

Change WS2812 timings to include the 300us WS2813 wait frame #465

Closed

Description

@MFornander

It seems like new WS2812 strips may actually be WS2813:
https://blog.particle.io/2017/05/11/ws2812b-neopixels-are-about-to-change

To be safe should we change the timing of all WS2812 code to have a default 300us (280us+) WAIT? I'm expecting an ever increasing flood of "my LEDs are flickering" issues being opened.

Activity

  1. focalintent commented on Jun 13, 2017

    @focalintent
    Contributor

    This is a little tricky because right now that value is also used to work out the buffer for allowing interrupts, so it won’t just be changing the number - it’ll break interrupt code to have the wrong value in there. But it’ll be dealt with.

  2. MFornander commented on Jun 14, 2017

    @MFornander
    Author

    First of all thanks for all the awesome work here Daniel, especially juggling WS timings and interrupts.

    I've been battling interrupts on the ESP8266 for months now. Disallowing interupts locks my ESP sooner or later so luck there. What's great is that with the 300us WAIT of the WS2813 setting, I'm getting a much more stable system which makes sense since it now has more time to survive the ESP's WiFi interrupt.

    An idea here would be to allow/guide interrupts toward the high signal since it seems like there is no time limit on holding the signal high. i.e. we could send a few bits, wait for a T1H and hold it there to allow interrupts. What's the overhead for blocking and unblocking interrupts on the ESP you know? Maybe we could nudge/force the ESP Wifi/Watchdog during the T1H moments?

    Unlimited time on TH source:
    https://wp.josh.com/2014/05/13/ws2812-neopixels-are-not-so-finicky-once-you-get-to-know-them/

  3. MFornander commented on Jun 14, 2017

    @MFornander
    Author

    Oh I just got what you were saying about interrupts I think after looking at the ESP code. By making the default WAIT 300us when a WS2812 will only tolerate 50us, we will actually RESET and display the frame by mistake if we get a long interrupt on an old 50us WS2812...

  4. focalintent commented on Jun 14, 2017

    @focalintent
    Contributor

    Unfortunately that "unlimited hold high" time is only valid for input to the first led - the long-held-high signal isn't carried through the re-shaped output that the LEDs have, so that isn't an option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions