Bedankt Arco voor je hulp!
Maar werkt nog steeds niet...
if(g_fromHostToDeviceBuffer[1] == LED1_ON) {
IdleI2C(); // Wait until the bus is idle
StartI2C(); // Send START condition
IdleI2C(); // Wait for the end of the START condition
WriteI2C( 0x40 ); // Send address from slave with R/W cleared for write (0100 0000)
IdleI2C(); // Wait for ACK
WriteI2C( 0x98 ); // Write adress from command register (1001 1000)
IdleI2C(); // Wait for ACK
WriteI2C( 0x00 ); // Write data for the command register
IdleI2C(); // Wait for ACK
WriteI2C( 0x00 ); // Write data for the command register
IdleI2C(); // Wait for ACK
WriteI2C( 0x00 ); // Write data for the command register
IdleI2C(); // Wait for ACK
WriteI2C( 0x00 ); // Write data for the command register
IdleI2C(); // Wait for ACK
WriteI2C( 0x00 ); // Write data for the command register
IdleI2C(); // Wait for ACK
StopI2C();
IdleI2C(); // Wait until the bus is idle
StartI2C(); // Send START condition
IdleI2C(); // Wait for the end of the START condition
WriteI2C( 0x40 ); // Send address from slave with R/W cleared for write (0100 0000)
IdleI2C(); // Wait for ACK
WriteI2C( 0x88 ); // Write adress from command register (1001 1000)
IdleI2C(); // Wait for ACK
WriteI2C( 0xFF ); // Write data for the command register
IdleI2C(); // Wait for ACK
WriteI2C( 0x00 ); // Write data for the command register
IdleI2C(); // Wait for ACK
WriteI2C( 0x00 ); // Write data for the command register
IdleI2C(); // Wait for ACK
WriteI2C( 0x00 ); // Write data for the command register
IdleI2C(); // Wait for ACK
WriteI2C( 0x00 ); // Write data for the command register
IdleI2C(); // Wait for ACK
StopI2C();
}