Sn74hc595 Class

Definition

SN74HC595 8-Bit Shift Registers With 3-State Output Registers Supports SPI and GPIO control

public class Sn74hc595 : Iot.Device.Multiplexing.ShiftRegister
type Sn74hc595 = class
    inherit ShiftRegister
Public Class Sn74hc595
Inherits ShiftRegister
Inheritance
Sn74hc595

Constructors

Sn74hc595(Sn74hc595PinMapping, Int32, GpioController, Boolean)

Initialize a new shift register connected through GPIO.

Sn74hc595(SpiDevice, Int32)

Initialize a new Sn74hc595 device connected through SPI. Uses 3 pins (MOSI -> SER, SCLK -> SRCLK, CE0 -> RCLK)

Properties

BitLength

Bit length across all connected registers.

(Inherited from ShiftRegister)
GpioController

GPIO controller.

(Inherited from ShiftRegister)
Length

The length of the segment; the number of GPIO pins it exposes.

(Inherited from ShiftRegister)
OutputEnable

Switch output register to high or low-impedance state. Enables or disables register outputs, but does not delete values. Requires use of GPIO controller.

(Inherited from ShiftRegister)
SpiDevice

SPI device.

(Inherited from ShiftRegister)
UsesGpio

Reports if shift register is connected with GPIO.

(Inherited from ShiftRegister)
UsesSpi

Reports if shift register is connected with SPI.

(Inherited from ShiftRegister)

Methods

ClearStorage(Boolean)

Clear storage register. Requires use of GPIO controller.

Dispose()

Cleanup. Failing to dispose this class, especially when callbacks are active, may lead to undefined behavior.

(Inherited from ShiftRegister)
Latch()

Latches values in data register to output pi. Requires use of GPIO controller.

(Inherited from ShiftRegister)
ShiftBit(PinValue)

Writes PinValue value to storage register. This will shift existing values to the next storage slot. Does not latch. Requires use of GPIO controller.

(Inherited from ShiftRegister)
ShiftByte(Byte, Boolean)

Shifts a byte -- 8 bits -- to the storage register. Assumes register bit length evenly divisible by 8. Pushes / overwrites any existing values. Latches by default.

(Inherited from ShiftRegister)
ShiftClear()

Shifts zeros. Will dim all connected LEDs, for example. Assumes register bit length evenly divisible by 8. Supports GPIO controller or SPI device.

(Inherited from ShiftRegister)
Write(Byte)

Writes discrete underlying bits to a virtual segment. Writes each bit, left to right. Least significant bit will written to index 0. Does not display output.

(Inherited from ShiftRegister)
Write(ReadOnlySpan<Byte>)

Writes discrete underlying bits to a virtual output. Writes each byte, left to right. Least significant bit will written to index 0. Does not display output.

(Inherited from ShiftRegister)

Explicit Interface Implementations

IOutputSegment.Display(CancellationToken)

Displays current state of segment. Segment is displayed at least until token receives a cancellation signal, possibly due to a specified duration expiring.

(Inherited from ShiftRegister)
IOutputSegment.DisplayAsync(CancellationToken)

Displays current state of segment. Segment is displayed at least until token receives a cancellation signal, possibly due to a specified duration expiring.

(Inherited from ShiftRegister)
IOutputSegment.Item[Int32]

Segment values.

(Inherited from ShiftRegister)
IOutputSegment.TurnOffAll()

Clears shift register. Performs a latch.

(Inherited from ShiftRegister)
IOutputSegment.Write(Int32, PinValue)

Writes a PinValue to a virtual segment. Does not display output.

(Inherited from ShiftRegister)

Applies to