-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fix bit timing #10
Fix bit timing #10
Conversation
There were 3 cycles of always-low time missing, making the bit time closer to 1us than 1.25us. This apparently was OK with whatever strips I tested way back, but not with the saleae ws2812b decoder.
I did a lot of testing in adafruit/circuitpython#6312, and adjusted the PIO program timing for |
Your final conclusion seemed to be: The timings from this code are now:
Your conclusion was:
Except for my bugs, my timings were intended to match what was in the core implementation of neopixel for rp2 family micros: // NeoPixels are 800khz bit streams. We are choosing zeros as <312ns hi, 936 lo> and ones
// and ones as <700 ns hi, 556 ns lo>. Your overall timing is faster than mine (833kHz vs 800kHz) overall but my "high" timings are very close to yours and I'm closer to what I thought was the received wisdom frequency of 800kHz. |
I tested something like five varieties until they all worked. But I felt constrained by the granularity of the PIO cycles, so maybe I didn't quite reach optimum. We can leave mine alone, I guess, unless you think they could use touching up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Updating https://github.com/adafruit/Adafruit_CircuitPython_NeoPxl8 to 0.3.0 from 0.2.5: > Merge pull request adafruit/Adafruit_CircuitPython_NeoPxl8#11 from FoamyGuy/fix_circup_instruction > Merge pull request adafruit/Adafruit_CircuitPython_NeoPxl8#10 from adafruit/fix-timings Updating https://github.com/adafruit/Adafruit_CircuitPython_Pastebin to 1.0.6 from 1.0.5: > Merge pull request adafruit/Adafruit_CircuitPython_Pastebin#3 from FoamyGuy/fix_circup_instruction Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA: > Added the following libraries: Adafruit_CircuitPython_WM8960 Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA: > Updated download stats for the libraries
There were 3 cycles of always-low time missing, making the bit time closer to 1us than 1.25us.
This apparently was OK with whatever strips I tested way back, but not with the saleae ws2812b decoder.
Now, a trace generated on either rp2040 or rp2350 decodes in saleae and has the expected content.