Acklowledge test on I2C bus

I'm trying to get a I2C Display run.

How can i check on a "Acklowledge" returned from the device on the I2C bus, after sending the correct slave address ?

cheers wally

Hi, if you are using the Wire-lib check the return value of Wire.endTransmission(). It is 0 if the data was succesfully transmitted, 2 if your slave device did not ACK the address, 3 if the device did not ACK some data you send, 4 if there is some other TWI error.

Eberhard

Now trying to read the status from the i2c-lcd. According to datasheet i have to send: RS=0 and RW=1 i should get Busy Flag and AddressCounter Address: BF AC6 AC5 AC4 AC3 AC2 AC1 AC0

From the wire-lib i understand that the RW is "automatically" added to the 7bit-Slave-address. In case of writing this is 0.

  1. Wire.beginTransmission(B0111110);
  2. Wire.send(0);
  3. Wire.send(databyte);

sends B01111100 RW=0 sends B00000000 Co = 0 and RS=0 (bit7, bit6) sends databyte

Does Wire.requestFrom(B0111110, 1); adds "automaticlly an 1 (RW=1, for read) to the slaveaddress ? (the 2nd parameter 1 is just the buffer size i guess)

How should my Statusrequest looks like, using the wire-lib ?

thx wally