Skip to content

Fix timing issue #20

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

Closed
wants to merge 1 commit into from
Closed

Fix timing issue #20

wants to merge 1 commit into from

Conversation

geekmomprojects
Copy link

This line of code as written creates a T1H timing of 625ns, which is short of the 800ns recommended. Some neopixels will not work with this timing. An example of the problem and the solution (as identified and solved by Twitter user @bornach) can be found in this Twitter thread (https://twitter.com/Bornach1/status/1301087477034344449?s=20)

This line of code as written creates a TIH timing of 625ns, which is short of the 800ns recommended. Some neopixels will not work with this timing. An example of the problem and the solution (as identified and solved by Twitter user @bornach) can be found in this Twitter thread (https://twitter.com/Bornach1/status/1301087477034344449?s=20)
@ladyada ladyada requested a review from caternuson September 2, 2020 17:46
@caternuson
Copy link
Collaborator

What specific product are you using? There are variations in the timing specifications among various "neopixel" like products. The current timings were tweaked to work with SK6812.

@ladyada Do we want to support other timings?

WS2811 (400kHz)
image

WS2812
image

WS2812B
image

SK6812
image

@geekmomprojects
Copy link
Author

I'm using a version of these: https://www.adafruit.com/product/1938, though mine aren't sourced from Adafruit. I'd be curious to know if the ones you sell work with the library as written or not.

@caternuson
Copy link
Collaborator

The current library timings appear to work OK with PID 1938 NeoPixels.

$ python3
Python 3.6.9 (default, Jul 17 2020, 12:50:27) 
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import board
>>> import neopixel_spi as neopixel
>>> pixels = neopixel.NeoPixel_SPI(board.SPI(), 1, pixel_order=neopixel.RGB)
>>> pixels.fill(0xADAF00)
>>> 

spi_neo_test

@caternuson caternuson mentioned this pull request Sep 3, 2020
@caternuson
Copy link
Collaborator

@geekmomprojects Do you know how to test PR code? If so, checkout the proposed changes I've submitted in #21

@geekmomprojects
Copy link
Author

@geekmomprojects Do you know how to test PR code? If so, checkout the proposed changes I've submitted in #21

Yes, I should be able to test your changes. I will check it out and respond in a bit. Thank you!

@geekmomprojects
Copy link
Author

@geekmomprojects Do you know how to test PR code? If so, checkout the proposed changes I've submitted in #21

Tested successfully. Thank you. The PR code works well - and is a nice, flexible fix for the timing issue.

@caternuson
Copy link
Collaborator

Closing this in favor of #22

@caternuson caternuson closed this Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants