ADS7830

CircuitPython driver for the ADS7830 analog to digital converter

  • Author(s): Liz Clark

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_ads7830.ads7830.ADS7830(i2c: busio.I2C, address: int = _I2C_ADDR, differential_mode: bool = False, int_ref_power_down: bool = False, adc_power_down: bool = False)

Adafruit ADS7830 ADC driver

Initialization over I2C

Parameters:
  • address (int) – I2C address (default 0x48)

  • differential_mode (bool) – Select differential vs. single mode

  • int_ref_power_down (bool) – Power down internal reference after sampling

  • adc_power_down (bool) – Power down ADC after sampling

read(channel: int) int

ADC value Scales the 8-bit ADC value to a 16-bit value

Parameters:

channel (int) – Channel (0-7)

Returns:

Scaled ADC value or raise an exception if read failed

Return type:

int

AnalogIn

AnalogIn for ADC readings.

  • Author(s): Liz Clark

class adafruit_ads7830.analog_in.AnalogIn(adc: ADS7830, pin: int)

AnalogIn Mock Implementation for ADC Reads.

Parameters:
  • adc (ADS7830) – The ADC object.

  • pin (int) – Required pin for reading.

property value: int

Returns the value of an ADC pin as an integer in the range [0, 65535].