Skip to main content

Class x74595

Provide an interface to connect to a 74595 shift register

Assembly: x74595.dll​
View Source​
Declaration
public class x74595 : IDigitalOutputController, IPinController, ISpiPeripheral

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

Properties​

Pins​

The pin definitions

View Source​
Declaration
public x74595.PinDefinitions Pins { get; }

DefaultSpiBusSpeed​

The default SPI bus speed for the device

View Source​
Declaration
public Frequency DefaultSpiBusSpeed { get; }

SpiBusSpeed​

The SPI bus speed for the device

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

DefaultSpiBusMode​

The default SPI bus mode for the device

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

SpiBusMode​

The SPI bus mode for the device

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

Fields​

spiComms​

SPI Communication bus used to communicate with the peripheral

View Source​
Declaration
protected ISpiCommunications spiComms

Methods​

CreateDigitalOutputPort(IPin, bool, OutputType)​

Creates a new DigitalOutputPort using the specified pin and initial state

View Source​
Declaration
public IDigitalOutputPort CreateDigitalOutputPort(IPin pin, bool initialState, OutputType outputType)
Returns​

Meadow.Hardware.IDigitalOutputPort

Parameters​
TypeNameDescription
Meadow.Hardware.IPinpinThe pin number to create the port on
System.BooleaninitialStateWhether the pin is initially high or low
Meadow.Hardware.OutputTypeoutputTypeThe port output type

Clear(bool)​

Clear the shift register buffer

View Source​
Declaration
public void Clear(bool update = true)
Parameters​
TypeNameDescription
System.BooleanupdateIf true, send changes to the shift register

WriteToPin(IPin, bool)​

Sets a particular pin's value.

View Source​
Declaration
public void WriteToPin(IPin pin, bool value)
Parameters​
TypeNameDescription
Meadow.Hardware.IPinpinThe pin to write to.
System.BooleanvalueThe value to write. True for high, false for low.

IsValidPin(IPin)​

Checks whether or not the pin passed in exists on the chip.

View Source​
Declaration
protected bool IsValidPin(IPin pin)
Returns​

System.Boolean

Parameters​
TypeName
Meadow.Hardware.IPinpin

GetPin(string)​

Get pin from name

View Source​
Declaration
public IPin GetPin(string pinName)
Returns​

Meadow.Hardware.IPin: An IPin object

Parameters​
TypeNameDescription
System.StringpinNameThe pin name

Implements​

  • Meadow.Hardware.IDigitalOutputController
  • Meadow.Hardware.IPinController
  • Meadow.Hardware.ISpiPeripheral