logo
pub struct Dac70501<Spi> { /* private fields */ }
Expand description

A 14 bit DAC

Implementations

Set the output voltage of the device and check the level bounds for the specified device

Safety

This function sets the output level without checking the bounds on the size of the value for the specified DAC

Creates a new instance of the specified dac with the internal state set to match the device defaults

Enables and disables the device internal reference. The internal reference is on by default

In power-off state the device output is connected to GND through a 1-kΩ internal resistor. The device is in power On state by default. This reduces current consumption to typically 15 µA at 5 V.

The reference voltage to the device (either from the internal or external reference) can be divided by a factor of two by setting the reference divider to Half. Make sure to configure the reference divider so that there is sufficient headroom from VDD to the DAC operating reference voltage. Improper configuration of the reference divider triggers a reference alarm condition. In the case of an alarm condition, the reference buffer is shut down, and all the DAC outputs go to 0 V. The DAC data registers are unaffected by the alarm condition, and thus enable the DAC output to return to normal operation after the reference divider is configured correctly. When the reference divider is set to Half, the reference voltage is internally divided by a factor of 2. The reference divider is set to OneX by default

When set to TwoX, the buffer amplifier for the DAC has a gain of 2x doubling the voltage output. When set to OneX it has a gain of 1x. Using this gain can be especially useful when using the internal reference divider set to Half. The output gain is set to TwoX by default

AlarmStatus is High when the difference between the reference and supply pins is below a minimum analog threshold. The status is Low otherwise. When High, the reference buffer is shut down, and the DAC outputs are all zero volts. The DAC codes are unaffected, and the DAC output returns to normal when the difference is above the analog threshold.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.