Expand description
§ADS124S08 Embassy Driver
Embassy-based driver for the Texas Instruments ADS124S08 24-bit precision ADC. This driver provides async support for SPI communication with the ADS124S08, suitable for high-precision analog-to-digital conversion in espresso machine temperature and pressure sensing applications.
The ADS124S08 is a precision, 24-bit, analog-to-digital converter (ADC) with 12 single-ended or 6 differential inputs, programmable gain amplifier (PGA), voltage reference, and two excitation current sources (IDACs).
§Usage Example
use variegated_ads124s08::{ADS124S08, WaitStrategy, PGAGain, ReferenceInput, IDACMagnitude, IDACMux};
// Create the driver with SPI device, DRDY pin, and delay provider
let wait_strategy = WaitStrategy::UseDrdyPin(drdy_pin);
let mut adc = ADS124S08::new(spi_device, wait_strategy, delay);
// Initialize the device
adc.initialize().await?;
// Perform a high-level measurement
let result = adc.measure_input_with_reference_and_pga(
InputP::AIN0, // Positive input
InputN::AIN1, // Negative input
ReferenceInput::REF0P_REF0N, // Reference
PGAGain::GAIN16, // 16x gain
Some(IDACMagnitude::uA500), // 500µA excitation current
IDACMux::AIN0, // Current output to AIN0
).await?;
// Convert to voltage
let voltage = result.to_voltage();See the datasheet in docs/datasheet.pdf for complete technical specifications.
Modules§
- registers
- Register definitions and configuration structures for the ADS124S08 Register definitions and bit field structures for the ADS124S08 ADC
Structs§
- ADS124
S08 - ADS124S08 ADC driver with Embassy async support
- Code
- Conversion result from the ADS124S08 ADC
Enums§
- ADS124
S08Error - Errors that can occur when communicating with the ADS124S08
- Command
- ADS124S08 commands as defined in the datasheet
- Wait
Strategy - Strategy for waiting for data ready signal from the ADS124S08