Class Ads1115
A TI ADS1115 16-bit analogue-to-digital converter.
public static class Ads1115
- Inheritance
-
Ads1115
- Inherited Members
Fields
ConfigReset
The value the configuration register reads after a reset.
public const ushort ConfigReset = 34179
Field Value
Methods
ConfigBits(Ads1115Config)
Assembles the 16-bit configuration register value.
public static ushort ConfigBits(Ads1115Config config)
Parameters
configAds1115ConfigThe settings to encode.
Returns
- ushort
The register value to write, most significant bit first.
ConfigFromBits(ushort)
Parses a 16-bit configuration register value.
public static Ads1115Config ConfigFromBits(ushort bits)
Parameters
bitsushortThe register value, as read from the device.
Returns
- Ads1115Config
The decoded settings. Every value decodes, so this never throws.
Exceptions
- PamojaException
The native call failed.
FullScaleMicrovolts(byte)
Returns the full-scale range a gain code selects.
public static uint FullScaleMicrovolts(byte pga)
Parameters
pgabyteThe gain code, 0 to 7.
Returns
- uint
The full scale in microvolts.
SamplesPerSecond(byte)
Returns the sample rate a data-rate code selects.
public static ushort SamplesPerSecond(byte dataRate)
Parameters
dataRatebyteThe data-rate code, 0 to 7.
Returns
- ushort
The rate in samples per second.
ToNanovolts(byte, short)
Converts a raw conversion result to nanovolts.
public static long ToNanovolts(byte pga, short raw)
Parameters
Returns
- long
The measured voltage, exact at every gain setting.
ToVolts(byte, short)
Converts a raw conversion result to volts.
public static float ToVolts(byte pga, short raw)
Parameters
Returns
- float
The measured voltage.