Richard, I was using the OP's example hence the address, and trying to explain that as a word variable he needed to write the high and low bytes. It was not meant as an optimised example...
I used the following to send word variable values to a PCA chip.. it might not be tight code, it may not be "as it should" in the eyes of more experienced programmers, or it may not follow convention in the manual... But it works
Code:
pcaChannel = 1
i2cControl = $6 + 4*pcaChannel
I2CWRITE SDApin,SCLpin,i2cWriteAddress,i2cControl,[0,0,CH2_PWM.lowbyte,CH2_PWM.highbyte]
Bookmarks