Table of Contents

Class Dac63004

Namespace
Iot.Device.Dac63004
Assembly
Iot.Device.Dac63004.dll

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

i2cDevice I2cDevice

I2cDevice to communicate with DAC63004 device.

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 i2cDevice is null.

Fields

DefaultI2cAddress

Dac63004 Default I2C Address.

public const byte DefaultI2cAddress = 72

Field Value

byte

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

bool

true if internal reference is enabled, otherwise false.

Methods

ConfigureChannelMode(Channel, Mode)

Configures the DAC channel funcional mode.

public void ConfigureChannelMode(Channel channel, Mode mode)

Parameters

channel Channel

The Channel to configure.

mode Mode

The funcional mode to put the channel in.

Exceptions

NotSupportedException

If the mode is not supported.

ConfigureChannelVoutGain(Channel, VoutGain)

Configures the Vout gain for DAC channel.

public void ConfigureChannelVoutGain(Channel channel, VoutGain gain)

Parameters

channel Channel

The Channel to configure.

gain VoutGain

The VoutGain to configure the channel to.

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

channel Channel

The Channel to set data to.

value int

The value to configure the data register for the channel.

Exceptions

ArgumentOutOfRangeException

If value is not in the range of 0 to 4095 (12 bits).