Skip to content
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

RP2040 PIO? #22

Open
objectiveSee opened this issue Oct 19, 2024 · 4 comments
Open

RP2040 PIO? #22

objectiveSee opened this issue Oct 19, 2024 · 4 comments

Comments

@objectiveSee
Copy link

This is library support programmable IO on the RP 2040? I am looking for a library that specifically supports this so that I don't have to have a lot of CPU dedicated to driving LEDs.

It's unclear whether the micro python core library for neopixel, supports PIO

https://github.com/micropython/micropython-lib/blob/master/micropython/drivers/led/neopixel/neopixel.py

Thanks!

@blaz-r
Copy link
Owner

blaz-r commented Oct 20, 2024

This library uses PIO as the main way to send data out to leds, but some code is still executed on the cpu (like pixel assignment and operations on pixels).

@objectiveSee
Copy link
Author

Thanks! Can you point to where the PIO stuff is in the code? I'm just curious to learn more about it.

@blaz-r
Copy link
Owner

blaz-r commented Oct 30, 2024

These lines include the PIO program used to generate bitstream for LEDs. Here the state machine is initialized. Finally, this is the code used to send data from python to PIO. In PR #20 there was also some work done to rewrite the PIO program so we don't need sleep function inside the python, but it's not completely verified.

@objectiveSee
Copy link
Author

Thank you for that clarification! Really helpful to see where in the code this happens.

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

No branches or pull requests

2 participants