eriksl / usitwislave

Software TWI/I2C implementation for ATtiny devices using USI.
Other
45 stars 14 forks source link

Problems with I2C line being reset #9

Open Drakehornbridge opened 7 years ago

Drakehornbridge commented 7 years ago

Hello I have multiple attiny85 all on the same i2c lines as slaves each with a unique address. However there seems to be an error where the i2c line appears to keep hitting the reset condition if they don't receive thier address. While going through the library I couldn't find the part of the state machine that handled ss_state=ss_state_address_not_slected (line 236) and was curious why the twi_reset_state(); (line 235) was needed as it would only disrupt the i2c line whilst other devices are being communicated with.

I would love your thoughts and on this. Thank you.

jpmgms commented 7 years ago

@Drakehornbridge have you found a solution for this problem? Going trough the same.. @eriksl Please could you explain why bus reset is needed if address is different? When i power on both of the attinys at the same time both SDA and SCL lines keep reseting on an infinite loop until the master tries to comunicate and then all slaves stop communicating.