New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MFornander opened this Issue Jun 13, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@MFornander

MFornander commented Jun 13, 2017

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.

@focalintent

This comment has been minimized.

Show comment
Hide comment
@focalintent

focalintent Jun 13, 2017

Member

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.

Member

focalintent commented Jun 13, 2017

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.

@MFornander

This comment has been minimized.

Show comment
Hide comment
@MFornander

MFornander Jun 14, 2017

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/

MFornander commented Jun 14, 2017

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/

@MFornander

This comment has been minimized.

Show comment
Hide comment
@MFornander

MFornander Jun 14, 2017

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...

MFornander commented Jun 14, 2017

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...

@focalintent

This comment has been minimized.

Show comment
Hide comment
@focalintent

focalintent Jun 14, 2017

Member

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.

Member

focalintent commented Jun 14, 2017

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