technoblogy / tiny-i2c

Minimal I2C master routines for all AVR microcontrollers.
161 stars 39 forks source link

NACK lock after reading from slave #11

Open oomek opened 4 years ago

oomek commented 4 years ago

I have 2 Attinys85 takling, the master with your lib and the slave with TinyWire. Writing to slave goes very well, but when I request data I get a NACK lock for all future r/w operations. Do you know by any chance what might be the problem?

image

technoblogy commented 4 years ago

OK, I’ll see if I can figure something out.

David

technoblogy commented 4 years ago

Sorry for the delay in having a look at this, but I can't see anything obviously wrong.

When you're requesting data are you specifying the number of bytes you want to read with the second parameter of TinyI2C.start(), or are you specifying the last byte with TinyI2C.readLast()?

oomek commented 4 years ago

I tried both ways with the same result.