Skip to content

A platform agnostic rust driver for the ADS122U04 (UART) and ADS122C04 (I2C) ADC from Texas Instruments.

License

Notifications You must be signed in to change notification settings

hacknus/ads122x04-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Texas Instruments ADS122x04 Rust Driver

crates.io Docs Rust

A platform agnostic rust driver for the ADS122U04 (UART) and ADS122C04 (I2C) ADC from Texas Instruments.

To use this driver, consult the I2C example below:

use ads122x04::{interface::*, registers::*, ADS122x04, Error as ADS122x04Error};

{
    let mut adc = ADS122x04::new_i2c(address, i2c);
    adc.reset();
    adc.calibrate_offset();
    adc.set_input_mux(Mux::Ain1Ain0);
    adc.set_conversion_mode(ConversionMode::Continuous);
    adc.set_current_level(CurrentSource::Off);
    adc.set_current_route_1(CurrentRoute::Ain3);
    adc.start();
    let measurement = adc.get_voltage();
}

TODO:

  • test UART
  • implement CRC

Products That Use This Library

About

A platform agnostic rust driver for the ADS122U04 (UART) and ADS122C04 (I2C) ADC from Texas Instruments.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages