Quote Originally Posted by Luciano View Post

Use the software I2C commands of PicBasic Pro. (I2CIN and I2COUT).
Do you mean I2Read and I2Write ?
Sorry i am not familiar with it. However i would like to try.

Correct me if i am wrong.
From datasheet,
control 0h and 1h is to read or write to the ports
control 6h and 7h is to set port as input or output

Given scenario 1 :
Connect 23016 address as $01
Assign GP0.0 to GP0.7 as input (control address is 6h)
Assign GP1.0 to GP1.7 as output (control address is 7h)

the code will be :
addr var byte
addr=01
I2CWRITE DataPin,ClockPin,06,addr,[FF]
I2CWRITE DataPin,ClockPin,07,addr,[00]

Scenario 2 :
Read the data on GP0.0 to GP0.7 and put inside Sample1

the code will be :
I2CREAD DataPin,ClockPin,00,addr,[Sample1]

Scenario 3 :
Write data 44h on GP1.0 to GP1.7

the code will be :
I2CWRITE DataPin,ClockPin,00,addr,[44]