Hi
Assuming that the PCA9698 is connected with AD0, AD1 and AD2 at GND its write address is 0x40 and its read address is 0x41.
To configure the first output (only) the transmission sequence is
0x40 0x18 0xfe
which will change it from its default input to output and it will drive '0'
To change it to '1' the transmission sequence is
0x40 0x08 0x01
To change it back to '0' the transmission sequence is
0x40 0x08 0x00
uTasker I2C interface code to do it (on I2C0 at 100kb/s) is:
define I2C_WRITE_ADDRESS 0x40
define I2C_READ_ADDRESS 0x41
static QUEUE_HANDLE I2CPortID = NO_ID_ALLOCATED;
static const unsigned char ucConfigureOutput[] = {I2C_WRITE_ADDRESS, 0x18, 0xfe};
static const unsigned char ucSetOutputHigh[] = {I2C_WRITE_ADDRESS, 0x08, 0x01};
static const unsigned char ucSetOutputLow[] = {I2C_WRITE_ADDRESS, 0x08, 0x00};
I2CTABLE tI2CParameters;
tI2CParameters.Channel = 0;
tI2CParameters.usSpeed = 100; // 100k
tI2CParameters.Rx_tx_sizes.TxQueueSize = 64; // transmit queue size
tI2CParameters.Rx_tx_sizes.RxQueueSize = 64; // receive queue size
tI2CParameters.Task_to_wake = 0; // no wake on transmission termination
I2CPortID = fnOpen(TYPE_I2C, FOR_I_O, &tI2CParameters);
fnWrite(I2CPortID, (unsigned char *)ucConfigureOutput, sizeof(ucConfigureOutput));
fnWrite(I2CPortID, (unsigned char *)ucSetOutputHigh, sizeof(ucSetOutputHigh));
fnWrite(I2CPortID, (unsigned char *)ucSetOutputLow, sizeof(ucSetOutputLow));
Regards
Mark