Expand description
A driver for the TI ADS112C04 16-bit I2C Delta-Sigma ADC
This crate provides a blocking, embedded-hal 1.0 compatible driver for the ADS112C04 analog-to-digital converter.
§Example
use ads112c04::{Ads112c04, Config0, Gain, InputMux};
let mut adc = Ads112c04::new(i2c, 0x40);
adc.reset().unwrap();
// Configure for single-ended measurement on AIN0
let config0 = Config0::default()
.with_input_mux(InputMux::Ain0ToAvss)
.with_gain(Gain::X1);
adc.write_config0(config0).unwrap();
// Start conversion and read result
adc.start_sync().unwrap();
let reading = adc.read_data().unwrap();Structs§
- Ads112c04
- ADS112C04 driver
- Config0
- Configuration Register 0 (Input & Gain)
- Config1
- Configuration Register 1 (Rate, Mode, Ref)
- Config2
- Configuration Register 2 (Status & IDAC Current)
- Config3
- Configuration Register 3 (IDAC Routing)
Enums§
- Command
- ADS112C04 I2C commands
- Conversion
Mode - Conversion mode
- Data
Rate - Data rate settings for normal mode
- Gain
- Programmable Gain Amplifier settings
- Idac
Current - IDAC current magnitude
- Idac
Routing - IDAC routing options
- Input
Mux - Input multiplexer configuration
- Mode
- Operating mode
- Register
- Register addresses
- Voltage
Reference - Voltage reference selection
Functions§
- raw_
to_ voltage_ mv - Convert raw ADC reading to voltage (standalone function)