You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This doesn't work well on old 6-pin WS2812 devices, Strictly speaking, you can get it mostly working by using a WS2812_CYCLE time of about 240ns, but it's still glitchy.
Even then, a look with the logic analyzer reveals the problem: a bit-banged test using the Particle Photon and the Adafruit_NeoPixel library gives the following timings:
As a rule of thumb we see that a low bit needs a longer time in the low state than the high state, and vice versa for high. A 2:1 duty cycle should suffice for both, but a 50:50 duty cycle will not do (it's a wonder it works at all for the WS2812B let alone the WS2812 - presumably the tH is what's mediating this and so lengthening that timing serves to be decoded as low versus high.
If possible, the RMT should be driving a more appropriate signal. Otherwise it's not a very reliable solution versus bit-banging (which works remarkably poorly on the ESP32).
This doesn't work well on old 6-pin WS2812 devices, Strictly speaking, you can get it mostly working by using a WS2812_CYCLE time of about 240ns, but it's still glitchy.
Even then, a look with the logic analyzer reveals the problem: a bit-banged test using the Particle Photon and the Adafruit_NeoPixel library gives the following timings:
The ESP32 RMT timings (with WS2812_CYCLE = 240ns):
The spec timings are as follows:
WS2812:
WS2812B:
As a rule of thumb we see that a low bit needs a longer time in the low state than the high state, and vice versa for high. A 2:1 duty cycle should suffice for both, but a 50:50 duty cycle will not do (it's a wonder it works at all for the WS2812B let alone the WS2812 - presumably the tH is what's mediating this and so lengthening that timing serves to be decoded as low versus high.
If possible, the RMT should be driving a more appropriate signal. Otherwise it's not a very reliable solution versus bit-banging (which works remarkably poorly on the ESP32).
(Note: there's a lot of leeway when signalling, but not enough to allow 50:50 timing to work glitch-free.)
The text was updated successfully, but these errors were encountered: