Class Mcp492x.AnalogOutputPort
Represents an analog output port for interfacing with the MCP492x DAC.
Assembly: Mcp492x.dll
View Source
public class Mcp492x.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; }
Gain
Gets or sets the Gain for the port
View Source
public Mcp492x.Gain Gain { get; set; }
BufferedInput
Gets or sets whether the port has a buffered input
View Source
public bool BufferedInput { 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 |
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