Check clock line status on I2C(TWI) ?

I'm working on interfacing mcp4728. Everything seems working fine except writing programmable slave address. Based on the datasheet, I need LDAC pin low right after 8th bit before ACK. http://ww1.microchip.com/downloads/en/DeviceDoc/22187E.pdf

I dig around wire and twi library. It seems TWSR only return status after ACK or NACK is received. Is there a way to check clock line itself or way to check when TWI send all 8 bit ?

I believe you can wait as long as you wish to pulse LDAC to low. If you wish to synchronize all four outputs, then it looks like you can write them all and pulse LDAC low any time prior to starting the next "set" or outputs.

Thanks for reply. As figure 5-11 note 2.b, timing of LDAC seem to be critical. It seems LDAC pulse has to happen low clock of 8th bit. I tried LDAC pulse after 2nd byte, it does not work. I checked timing of the pulse using another arduino, it happened after receive ACK.

Found no figure 5-11 in http://www.sparkfun.com/datasheets/BreakoutBoards/MCP4725.pdf

I'm working on 4 channel dac mcp4728 not mcp4725.

Ah. Oh. Disregard my previous, that was for the normal use of LDAC. For setting slave address on this chip you are correct the timing is critical.

May be no way to do this with the library, I dont know. You might have to write your own function using raw digitalWrite()