Skip to main content

Class Mcp492x

This class represents an MCP492x digital-to-analog converter (DAC) and implements the ISpiPeripheral and IAnalogOutputController interfaces.

Assembly: Mcp492x.dll
View Source
Declaration
public abstract class Mcp492x : ISpiPeripheral, IAnalogOutputController, IPinController

Derived:
Meadow.Foundation.ICs.DAC.Mcp4921

Implements:
Meadow.Hardware.ISpiPeripheral, Meadow.Hardware.IAnalogOutputController, Meadow.Hardware.IPinController

Properties

DefaultSpiBusMode

Gets the default SPI bus mode (Mode0).

View Source
Declaration
public SpiClockConfiguration.Mode DefaultSpiBusMode { get; }

DefaultSpiBusSpeed

Gets the default SPI bus speed (20 MHz).

View Source
Declaration
public Frequency DefaultSpiBusSpeed { get; }

SpiBusMode

Gets or sets the SPI bus mode.

View Source
Declaration
public SpiClockConfiguration.Mode SpiBusMode { get; set; }

SpiBusSpeed

Gets or sets the SPI bus speed.

View Source
Declaration
public Frequency SpiBusSpeed { get; set; }

Methods

CreateAnalogOutputPort(IPin)

Creates an IAnalogOutputPort on the specified pin

View Source
Declaration
public IAnalogOutputPort CreateAnalogOutputPort(IPin pin)
Returns

Meadow.Hardware.IAnalogOutputPort

Parameters
TypeNameDescription
Meadow.Hardware.IPinpinThe pin on which to create the port.

CreateAnalogOutputPort(IPin, Gain, bool)

Creates an IAnalogOutputPort on the specified pin

View Source
Declaration
public IAnalogOutputPort CreateAnalogOutputPort(IPin pin, Mcp492x.Gain gain = Gain.Gain1x, bool bufferedInput = false)
Returns

Meadow.Hardware.IAnalogOutputPort

Parameters
TypeNameDescription
Meadow.Hardware.IPinpinThe pin on which to create the port.
Meadow.Foundation.ICs.DAC.Mcp492x.Gaingain
System.BooleanbufferedInput

Implements

  • Meadow.Hardware.ISpiPeripheral
  • Meadow.Hardware.IAnalogOutputController
  • Meadow.Hardware.IPinController