GPA sollte schon funktionieren.Leider bleiben GPA und auch GPB trotzdem stumm.
Steck' mal die Kontrolle in die Sub.
Sub I2c_mcp23016_write(byval Cmd As Byte , Byval Lsb As Byte , Byval Data2 As Byte) ' Writes data to the I2C MCP23016.
Print Bin(lsb) 'Ausgabe zur Kontrolle
Print Bin(msb) 'Ausgabe zur Kontrolle
I2cstart 'Generate A Start Condition
I2cwbyte Mcp23016_adress_w 'Transmit The "ADDRESS and WRITE" Byte
I2cwbyte Cmd 'Transmit The Command Byte
I2cwbyte Lsb 'Transmit First Data Byte
I2cwbyte Msb 'Transmit Second Data Byte
I2cstop 'Generate a STOP condition
Waitus 50 'Some delay may be necessary for back to back transmitions
End Sub
Lesezeichen