wws_74hc165
¶
CircuitPython driver for 74HC165 shift register.
Author(s): John Woolsey
Implementation Notes¶
Based on Adafruit_CircuitPython_74HC595 driver library.
Hardware:
74HC165 Shift Register
Software and Dependencies:
Adafruit CircuitPython firmware for the supported boards: https://github.com/adafruit/circuitpython/releases
Adafruit’s Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
- class wws_74hc165.DigitalInOut(pin_number: Pin, shift_register_74hc165: ShiftRegister74HC165)¶
Digital input/output of the 74HC165. The interface is exactly the same as the
digitalio.DigitalInOut
class, however note that by design this device is INPUT ONLY! Attempting to write outputs or set direction as output will raise an exception.- property direction: digitalio.Direction.INPUT¶
Direction
can only be set toINPUT
.
- class wws_74hc165.ShiftRegister74HC165(spi: SPI, latch: digitalio.DigitalInOut, number_of_shift_registers: int = 1, baudrate: int = 1000000)¶
Initialize the 74HC165 on the specified SPI bus, indicate the number of shift registers being used, and the optional baudrate.
- get_pin(pin: int) DigitalInOut ¶
Convenience function to create an instance of the DigitalInOut class pointing at the specified pin of this 74HC165 device.
- property gpio: array | bytearray | bytes | memoryview | rgbmatrix.RGBMatrix | ulab.numpy.ndarray¶
The raw GPIO input register. Each bit represents the input value of the associated pin (0 = low, 1 = high).