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

Multiple hx711s wastes PIO/SM resources #60

Open
endail opened this issue Jul 12, 2023 · 1 comment
Open

Multiple hx711s wastes PIO/SM resources #60

endail opened this issue Jul 12, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@endail
Copy link
Owner

endail commented Jul 12, 2023

Each time a hx711_t is init'd, a copy of the PIO program is inserted into one of the RP2040's PIOs. It should instead:

  • check if the program already exists in PIO memory
  • if not, add it
  • then set up an individual state machine with the program counter pointing to the program

Many SMs to one PIO.

@endail endail added the enhancement New feature or request label Jul 12, 2023
@endail endail self-assigned this Jul 12, 2023
@endail
Copy link
Owner Author

endail commented Jul 29, 2023

This will not work for hx711_multi_t.

The PIO init function modifies the PIO program itself to set the number of in pins. Individual state machines using the same PIO would therefore be required to use the same configuration.

May still be feasible for individual hx711_ts...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant