Skip to main content

Class Mcp4728.AnalogOutputPort

Represents an analog output port for interfacing with the Mcp4728 DAC.

Assembly: Mcp4728.dll​
View Source​
Declaration
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​
Declaration
public IAnalogChannelInfo Channel { get; }

Pin​

Gets the pin associated with the port.

View Source​
Declaration
public IPin Pin { get; }

MaxOutputValue​

Maximum Output value that can be used with this Meadow.Hardware.IAnalogOutputPort

View Source​
Declaration
public uint MaxOutputValue { get; }

VoltageReference​

Voltage reference of the Meadow.Hardware.IAnalogOutputPort

View Source​
Declaration
public Voltage VoltageReference { get; }

VoltageResolution​

Voltage resolution of the Meadow.Hardware.IAnalogOutputPort

View Source​
Declaration
public Voltage VoltageResolution { get; }

Settings​

Gets or sets the Channel Settings for the port

View Source​
Declaration
public Mcp4728.ChannelSettings Settings { get; set; }

Buffered​

Gets or sets whether the port has a buffered value (Defers update until commanded)

View Source​
Declaration
public bool Buffered { get; set; }

Methods​

Dispose()​

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

View Source​
Declaration
public void Dispose()

GenerateOutput(uint)​

Instructs the IAnalogOutputPort to generate an analog output signal corresponding to the provided digital value

View Source​
Declaration
public Task GenerateOutput(uint digitalValue)
Returns​

System.Threading.Tasks.Task

Parameters​
TypeNameDescription
System.UInt32digitalValueThe 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​
Declaration
public Task GenerateOutput(Voltage voltageValue)
Returns​

System.Threading.Tasks.Task

Parameters​
TypeNameDescription
Meadow.Units.VoltagevoltageValueThe 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​
Declaration
public void HighZ()

Implements​

  • Meadow.Hardware.IAnalogOutputPort
  • Meadow.Hardware.IAnalogPort
  • Meadow.Hardware.IPort<Meadow.Hardware.IAnalogChannelInfo>
  • System.IDisposable