Class Mcp4728.AnalogOutputPort
Represents an analog output port for interfacing with the Mcp4728 DAC.
Assembly: Mcp4728.dll
View Source
public class Mcp4728.AnalogOutputPort : IAnalogOutputPort, IAnalogPort, IPort<IAnalogChannelInfo>, IDisposable
Implements:
Meadow.Hardware.IAnalogOutputPort
, Meadow.Hardware.IAnalogPort
, Meadow.Hardware.IPort<Meadow.Hardware.IAnalogChannelInfo>
, System.IDisposable
Properties
Channel
Gets the channel associated with the port.
View Source
public IAnalogChannelInfo Channel { get; }
Pin
Gets the pin associated with the port.
View Source
public IPin Pin { get; }
MaxOutputValue
Maximum Output value that can be used with this Meadow.Hardware.IAnalogOutputPort
View Source
public uint MaxOutputValue { get; }
VoltageReference
Voltage reference of the Meadow.Hardware.IAnalogOutputPort
View Source
public Voltage VoltageReference { get; }
VoltageResolution
Voltage resolution of the Meadow.Hardware.IAnalogOutputPort
View Source
public Voltage VoltageResolution { get; }
Settings
Gets or sets the Channel Settings for the port
View Source
public Mcp4728.ChannelSettings Settings { get; set; }
Buffered
Gets or sets whether the port has a buffered value (Defers update until commanded)
View Source
public bool Buffered { get; set; }
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
View Source
public void Dispose()
GenerateOutput(uint)
Instructs the IAnalogOutputPort to generate an analog output signal corresponding to the provided digital value
View Source
public Task GenerateOutput(uint digitalValue)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | digitalValue | The digital value to convert to an analog signal |
GenerateOutput(Voltage)
Instructs the IAnalogOutputPort to generate an analog output signal corresponding to the provided voltage value
View Source
public Task GenerateOutput(Voltage voltageValue)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name | Description |
---|---|---|
Meadow.Units.Voltage | voltageValue | The target voltage output, which will be automatically adjusted to the nearest selectable value. |
HighZ()
Turns off the output, setting the pin to high impedance
View Source
public void HighZ()
Implements
Meadow.Hardware.IAnalogOutputPort
Meadow.Hardware.IAnalogPort
Meadow.Hardware.IPort<Meadow.Hardware.IAnalogChannelInfo>
System.IDisposable