Class MCP23x17

All Implemented Interfaces:
DeviceEventConsumer<DigitalInputEvent>, GpioExpander, DeviceFactoryInterface, GpioDeviceFactoryInterface, PwmOutputDeviceFactoryInterface, Closeable, AutoCloseable, Consumer<DigitalInputEvent>
Direct Known Subclasses:
MCP23017, MCP23S17

public abstract class MCP23x17
extends MCP23xxx
https://www.instructables.com/Arduino-NANO-Tests-2-MCP23S17-IO-Xpanders
 I2C |   SPI | Notch | SPI/I2C
     |  GPB0 |  1 28 | GPA7
     |  GPB1 |  2 27 | GPA6
     |  GPB2 |  3 26 | GPA5
     |  GPB3 |  4 25 | GPA4
     |  GPB4 |  5 24 | GPA3
     |  GPB5 |  6 23 | GPA2
     |  GPB6 |  7 22 | GPA1
     |  GPB7 |  8 21 | GPA0
     |  3v3  |  9 20 | INT A
     |  GND  | 10 19 | INT B
  NC |   CS  | 11 18 | 3v3 (via 1KOhm resister)
 SCK |  SCK  | 12 17 | GND
 SDA | MOSI  | 13 16 | GND
  NC | MISO  | 14 15 | GND
 
  • Constructor Details

    • MCP23x17

      public MCP23x17​(String deviceName)
    • MCP23x17

      public MCP23x17​(String deviceName, int interruptGpio)
    • MCP23x17

      public MCP23x17​(String deviceName, int interruptGpioA, int interruptGpioB)
  • Method Details

    • getIODirReg

      protected int getIODirReg​(int port)
      Specified by:
      getIODirReg in class MCP23xxx
    • getIPolReg

      protected int getIPolReg​(int port)
      Specified by:
      getIPolReg in class MCP23xxx
    • getGPIntEnReg

      protected int getGPIntEnReg​(int port)
      Specified by:
      getGPIntEnReg in class MCP23xxx
    • getDefValReg

      protected int getDefValReg​(int port)
      Specified by:
      getDefValReg in class MCP23xxx
    • getIntConReg

      protected int getIntConReg​(int port)
      Specified by:
      getIntConReg in class MCP23xxx
    • getIOConReg

      protected int getIOConReg​(int port)
      Specified by:
      getIOConReg in class MCP23xxx
    • getGPPullUpReg

      protected int getGPPullUpReg​(int port)
      Specified by:
      getGPPullUpReg in class MCP23xxx
    • getIntFReg

      protected int getIntFReg​(int port)
      Specified by:
      getIntFReg in class MCP23xxx
    • getIntCapReg

      protected int getIntCapReg​(int port)
      Specified by:
      getIntCapReg in class MCP23xxx
    • getGPIOReg

      protected int getGPIOReg​(int port)
      Specified by:
      getGPIOReg in class MCP23xxx
    • getOLatReg

      protected int getOLatReg​(int port)
      Specified by:
      getOLatReg in class MCP23xxx
    • getBoardPinInfo

      public BoardPinInfo getBoardPinInfo()
      Description copied from interface: DeviceFactoryInterface
      Get information about pins that can be provisioned by this device factory.
      Returns: