Class Dac63004
Ultra-low-power four-channel 12-bit smart DAC Dac63004.
[Interface("Ultra-low-power four-channel 12-bit smart DAC Dac63004")]
public class Dac63004
- Inheritance
-
Dac63004
- Extension Methods
Constructors
Dac63004(I2cDevice)
Initializes a new instance of the Dac63004 class.
public Dac63004(I2cDevice i2cDevice)
Parameters
Exceptions
- InvalidOperationException
When failing to read part information.
- NotSupportedException
If the part information returned is invalid, thus the connected part is not one of the supported DAC63004 devices.
- ArgumentNullException
If
i2cDeviceis null.
Fields
DefaultI2cAddress
Dac63004 Default I2C Address.
public const byte DefaultI2cAddress = 72
Field Value
Remarks
Assuming A0 pin connected to GND. For other address configurations see datasheet 7.5.2.2.1 Address Byte.
- A0 connected to GND: 0b01001000
- A0 connected to VDD: 0b01001001
A0 connected to SDA: 0b01001010
A0 connected to SCL: 0b01001011
Properties
InternalRefEnabled
Gets or sets a value indicating whether the internal reference is enable.
[Property]
public bool InternalRefEnabled { get; set; }
Property Value
Methods
ConfigureChannelMode(Channel, Mode)
Configures the DAC channel funcional mode.
public void ConfigureChannelMode(Channel channel, Mode mode)
Parameters
Exceptions
- NotSupportedException
If the
modeis not supported.
ConfigureChannelVoutGain(Channel, VoutGain)
Configures the Vout gain for DAC channel.
public void ConfigureChannelVoutGain(Channel channel, VoutGain gain)
Parameters
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
SetChannelDataValue(Channel, int)
Sets output data value for DAC channel.
public void SetChannelDataValue(Channel channel, int value)
Parameters
channelChannelThe Channel to set data to.
valueintThe value to configure the data register for the
channel.
Exceptions
- ArgumentOutOfRangeException
If
valueis not in the range of 0 to 4095 (12 bits).