Control MCP23017 16-Ch Open Collector

Very new here. I’m trying to control my new MCP23017. I am able to get basic communications with the hardware (com port) but I need specifics on how to control each driver on the board. Bit frustrated as I have read a lot of material and I am still lost. Any help would be appreciated. Thanks,

Hi Russell,

What do you have the MCP23017 board connected to? Arduino, Pi, NCD I2C controller, etc.

Hi Travis, thanks for your response, I am using the USB Interface Adapter for NCD IoT Devices Virtual COM Port FT230XS connected to my Windows PC. I am developing in VB.net and using the read/write functions in NCDComponent.dll. I can get a response byte (170) from the USB interface adapter with this code. Thanks for any help you can provide.

    Dim CommandString As String = "AA,02,FE,21,CB"
    Dim CommandBytes(CommandString.Split(",").Length - 1) As Byte
    For I As Integer = 0 To CommandBytes.Length - 1
        CommandBytes(I) = Convert.ToByte(CommandString.Split(",")(I), 16)
    Next

    NcdComponent1.WriteBytes(CommandBytes)
    MsgBox(NcdComponent1.ReadByte.ToString)

Hi Russell,
You might try looking at the source code for Alpha Station (https://ncd.io/alpha), there are samples for the MCP23017 that are working (so you can test the UI first), then dig into the code further.
Hope this helps.
Ryan

Thanks Ryan, I am up and running. I just continued further in the https://ncd.io/serial-to-i2c-conversion/ documentation.

Great, I forgot about that! Let me know if you need anything else.
Ryan