Skip to main content

Class Sc16is7x2

Represents an Sc16is7x2 SPI/I2C UART

Assembly: Sc16is7x2.dll
View Source
public abstract class Sc16is7x2 : ISerialController, II2cPeripheral, ISpiPeripheral

Derived:
Meadow.Foundation.ICs.IOExpanders.Sc16is752, Meadow.Foundation.ICs.IOExpanders.Sc16is762

Implements:
Meadow.Hardware.ISerialController, Meadow.Hardware.II2cPeripheral, Meadow.Hardware.ISpiPeripheral

Properties

PortA

The port name for Port A

View Source
public Sc16is7x2.Sc16SerialPortName PortA { get; }

PortB

The port name for Port B

View Source
public Sc16is7x2.Sc16SerialPortName PortB { get; }

DefaultI2cAddress

The default I2C address for the peripheral

View Source
public byte DefaultI2cAddress { get; }

MaxI2cBusSpeed

The maximum I2C bus speed for the peripheral

View Source
public I2cBusSpeed MaxI2cBusSpeed { get; }

DefaultSpiBusMode

The default SPI bus mode for the peripheral

View Source
public SpiClockConfiguration.Mode DefaultSpiBusMode { get; }

DefaultSpiBusSpeed

The default SPI bus frequency for the peripheral

View Source
public Frequency DefaultSpiBusSpeed { get; }

SpiBusMode

The current SPI bus mode for the peripheral

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

SpiBusSpeed

The current SPI bus frequency for the peripheral

View Source
public Frequency SpiBusSpeed { get; set; }

Methods

CreateSerialPort(SerialPortName, int, int, Parity, StopBits, int)

Creates an RS232 Serial Port

View Source
public ISerialPort CreateSerialPort(SerialPortName portName, int baudRate = 9600, int dataBits = 8, Parity parity = Parity.None, StopBits stopBits = StopBits.One, int readBufferSize = 64)
Returns

Meadow.Hardware.ISerialPort

Parameters
TypeNameDescription
Meadow.Hardware.SerialPortNameportNameThe Sc16SerialPortName name of the channel to create
System.Int32baudRateThe baud rate used in communication
System.Int32dataBitsThe data bits used in communication
Meadow.Hardware.ParityparityThe parity used in communication
Meadow.Hardware.StopBitsstopBitsThe stop bits used in communication
System.Int32readBufferSizeThe buffer read buffer size

CreateRs485SerialPort(Sc16SerialPortName, int, int, Parity, StopBits, bool)

Creates an RS485 Serial Port

View Source
public ISerialPort CreateRs485SerialPort(Sc16is7x2.Sc16SerialPortName portName, int baudRate = 9600, int dataBits = 8, Parity parity = Parity.None, StopBits stopBits = StopBits.One, bool invertDE = false)
Returns

Meadow.Hardware.ISerialPort

Parameters
TypeNameDescription
Meadow.Foundation.ICs.IOExpanders.Sc16is7x2.Sc16SerialPortNameportNameThe Sc16SerialPortName name of the channel to create
System.Int32baudRateThe baud rate used in communication
System.Int32dataBitsThe data bits used in communication
Meadow.Hardware.ParityparityThe parity used in communication
Meadow.Hardware.StopBitsstopBitsThe stop bits used in communication
System.BooleaninvertDESet to true to invert the logic (active high) driver enable output signal

Implements

  • Meadow.Hardware.ISerialController
  • Meadow.Hardware.II2cPeripheral
  • Meadow.Hardware.ISpiPeripheral