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

[FR] 74HC595 support for RP2040 #544

Open
Paciente8159 opened this issue Oct 20, 2023 Discussed in #543 · 6 comments
Open

[FR] 74HC595 support for RP2040 #544

Paciente8159 opened this issue Oct 20, 2023 Discussed in #543 · 6 comments
Labels
HAL: RP2040 HAL: RP2040 request: HAL request: new HAL boards, mcus, etc

Comments

@Paciente8159
Copy link
Owner

Discussed in #543

Originally posted by Hyakutake12 October 20, 2023
Hi!
I see shift register outputs are not supported for rp2040 mcu. Any plans to implement this feature?

@Paciente8159 Paciente8159 added request: HAL request: new HAL boards, mcus, etc HAL: RP2040 HAL: RP2040 labels Oct 20, 2023
@Paciente8159
Copy link
Owner Author

RP2040 already support 74HC595 via bitbang or SPI.
I2S is not yet supported.

@Hyakutake12
Copy link

Hi. I could configure 74hc595 after the web builder update. Even after chaining 4 shift registers, the firmware is able to run 6 steppers and other outputs at high enough speed. I feel bit banging fulfills my requirement and no need for i2s. You can close the FR.. thanks

@Paciente8159
Copy link
Owner Author

Ok thanks for the feedback.
You might get even better throughput using hardware SPI @ 20MHz (theoretical top speed for the 74HC595).
Never the less I will leave this open for future development when I find the time.

@andrewmarles
Copy link

andrewmarles commented Nov 1, 2023

Always keep an eye on this project, and I just wanted to mention that GRBLHAL has support for shift registers on RP2040 using the PIO. This creates the entire waveform for step/dir on 4 axes (direction, step pulse rise, step pulse fall). Because the whole waveform is handled in the PIO, it cuts the IRQ overhead in half and is just as fast as hardware SPI.

https://github.com/grblHAL/RP2040/blob/6ecdf608fbfe1d9d8091a73c2e46a12cd9d638b9/driverPIO.pio#L111

I just thought I'd post here because it might give someone ideas for uCNC and it is the only place I have really seen where a project has leveraged the PIO for motion control.

@Paciente8159
Copy link
Owner Author

Thanks for the info. Very interesting stuff indeed. I'll will dive deeper into this for sure.

@Paciente8159
Copy link
Owner Author

Always keep an eye on this project, and I just wanted to mention that GRBLHAL has support for shift registers on RP2040 using the PIO. This creates the entire waveform for step/dir on 4 axes (direction, step pulse rise, step pulse fall). Because the whole waveform is handled in the PIO, it cuts the IRQ overhead in half and is just as fast as hardware SPI.

https://github.com/grblHAL/RP2040/blob/6ecdf608fbfe1d9d8091a73c2e46a12cd9d638b9/driverPIO.pio#L111

I just thought I'd post here because it might give someone ideas for uCNC and it is the only place I have really seen where a project has leveraged the PIO for motion control.

I've just implemented a custom 74HC595 control IO via PIO in this branch. Thanks for the tip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HAL: RP2040 HAL: RP2040 request: HAL request: new HAL boards, mcus, etc
Projects
None yet
Development

No branches or pull requests

3 participants