lucullusTheOnly / TinyWire

Composite Master and Slave I2C library for Atmels ATTiny microcontrollers
107 stars 26 forks source link

Don't accept slave address >= 64 (DEC) somehow. #15

Closed EUA closed 5 years ago

EUA commented 5 years ago

For example: Wire.begin(64); makes device invisible to i2c scan. but Wire.begin(63); is working perfect. I don't know why...

twi.cpp : 713 if ( ( USIDR == 0 ) || ( ( USIDR >> 1 ) == slaveAddress) ) doesn't allow it somehow. If I replace the line with if(1) than device seen at all addresses while i2c scan.

Please check it. Thanks

EUA commented 5 years ago

Looks like inherited bug from TinyWireS https://github.com/rambo/TinyWire/issues/41

EUA commented 5 years ago

As I understand, quick scanning i2c bus for all address exhausting ATTiny even under using 16Mhz Internal OSC.