Class Ads7128
Controller for the ADS7128 analog-to-digital converter chip that supports individual analog input control and array-based analog input operations.
Assembly: Ads7128.dll
View Source
public class Ads7128 : IAnalogInputController, IAnalogInputArrayController, IPinController
Implements:
Meadow.Hardware.IAnalogInputController
, Meadow.Hardware.IAnalogInputArrayController
, Meadow.Hardware.IPinController
Properties
Pins
Gets the pin definitions for this ADC controller.
View Source
public Ads7128.PinDefinitions Pins { get; }
ReferenceVoltage
Gets the reference voltage used by the ADC for conversions.
View Source
public Voltage ReferenceVoltage { get; }
DefaultI2cAddress
The default I2C address for the peripheral
View Source
public byte DefaultI2cAddress { get; }
CurrrentOversampling
Gets or sets the current oversampling configuration for the ADC.
View Source
public Ads7128.Oversampling CurrrentOversampling { get; set; }
Fields
ADCPrecisionBits
The precision of the ADC in bits.
View Source
public const byte ADCPrecisionBits = 12
Methods
CreateAnalogInputPort(IPin, Voltage?)
Creates an analog input port using the specified pin.
View Source
public IAnalogInputPort CreateAnalogInputPort(IPin pin, Voltage? voltageReference = null)
Returns
Meadow.Hardware.IAnalogInputPort
: An instance of Meadow.Hardware.IAnalogInputPort
configured for the specified pin.
Parameters
Type | Name | Description |
---|---|---|
Meadow.Hardware.IPin | pin | The pin to use for analog input. |
System.Nullable<Meadow.Units.Voltage> | voltageReference | Optional reference voltage for the analog input. If null, the default reference voltage will be used. |
CreateAnalogInputArray(params IPin[])
Creates an array of analog inputs from the specified pins.
View Source
public IAnalogInputArray CreateAnalogInputArray(params IPin[] pins)
Returns
Meadow.Hardware.IAnalogInputArray
: An instance of Meadow.Hardware.IAnalogInputArray
configured with the specified pins.
Parameters
Type | Name | Description |
---|---|---|
Meadow.Hardware.IPin[] | pins | The collection of pins to use for the analog input array. |
Implements
Meadow.Hardware.IAnalogInputController
Meadow.Hardware.IAnalogInputArrayController
Meadow.Hardware.IPinController