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

ADS1256 SPI analog addon #841

Merged
merged 9 commits into from
Feb 17, 2024
Merged

Conversation

FeralAI
Copy link
Contributor

@FeralAI FeralAI commented Feb 17, 2024

This PR is for a new addon for the ADS1256, a low noise 24-bit 8-channel Analog-to-Digital converter that communicates over SPI. This addon is modeled after the existing ADS1219 addon, so extra features like deadzone config and autocalibration are not present. This work includes:

  • Implemented SPI driver in PicoPeripherals library, including support for DMA (not used for ADS1256, but there when needed)
  • Ported this ADS1256 library into GP2040-CE and uses the PicoPeripherals SPI driver
  • Fixed support for FLOAT and DOUBLE in the Protobuf implementation. The macros needed to support those data types were not present in config_utils.cpp.
  • Added ADS1256 section to the Addons page

Screenshot 2024-02-16-211200

For the addons page, SPI pulls from the configured peripherals and the addon will not allow configuration if at least one SPI block is not configured, similar to the ADS1219 addon. It will also present a dropdown to select the CS pin using a combination of the selected SPI block's HW CS pin and other available pins.

mikepparks
mikepparks previously approved these changes Feb 17, 2024
Copy link
Contributor

@mikepparks mikepparks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code checks out on my end. @FeralAI tested enough on hardware that implementation testing is good enough for me.

@arntsonl
Copy link
Contributor

Nice, I'll do a once over but this is looking clean to me

Copy link
Contributor

@arntsonl arntsonl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thank you @FeralAI !!!

@arntsonl arntsonl merged commit f01d54f into OpenStickCommunity:main Feb 17, 2024
30 checks passed
@FeralAI FeralAI deleted the feature/spi branch February 18, 2024 02:42
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.

3 participants