Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

i2c - MCP23017 library

elconfa
2019-01-10
2023-01-13
  • elconfa - 2019-01-10

    Good morning,
    I made a small change to the library i2c - MCP23017.

    Now when the pins are set as inputs, the signal arriving at the PLC reflects the opposite logical state with respect to the input signal.
    In practice, when the pin is set to 0V, the high signal arrives on the PLC.

    I think it's easier to manage inputs this way.

    I provide both the normal library and the compiled library.

    What do you think?

    Massimo

    I2C_MCP23017_Confa.compiled library [160.9 KiB]

    I2C_MCP23017_Confa.library [304.06 KiB]

     
  • laruso - 2023-01-13

    I really appreciate your changes on the library regarding the polarity of inputs. Additionally I tweaked it a little bit to controll this for each port with a variable.

    What do think?

     

Log in to post a comment.