Hi all,
I have a complex split I2C bus with 20 devices on it.
The communication with all devices works ok with with Teensy 3.1 at 100KHz, emulating the wire library.
I wasn't able to make it run with newest i2c_t3 library because the leak of examples I found, perhaps I didn't set everything right.
I want to increase the I2C bus speed to 400KHz or 1MHz, using the wire library.
Since I do not understand the emulation concept even I've looked to the twi and wire files, do I have to modify the twi.h file (arduino1.6.5r2/hardware/tensy/avr/libraries/wire/utility/twi.h) ?
#ifndef TWI_FREQ
#define TWI_FREQ 100000L // 400000L for 400KHz, 1000000L for 1MHz?
#endif
However, the TWBR emulation code from wire.h looks like 400KHz is maximum accepted while the "TwoWire::setClock(uint32_t frequency)" routine from wire.ccp shows that 1MHz I2C is possible.
How do I set the I2C wire for 400KHz or 1MHz speed in a proper way, without altering the library ?
thx,
Vasile
I have a complex split I2C bus with 20 devices on it.
The communication with all devices works ok with with Teensy 3.1 at 100KHz, emulating the wire library.
I wasn't able to make it run with newest i2c_t3 library because the leak of examples I found, perhaps I didn't set everything right.
I want to increase the I2C bus speed to 400KHz or 1MHz, using the wire library.
Since I do not understand the emulation concept even I've looked to the twi and wire files, do I have to modify the twi.h file (arduino1.6.5r2/hardware/tensy/avr/libraries/wire/utility/twi.h) ?
#ifndef TWI_FREQ
#define TWI_FREQ 100000L // 400000L for 400KHz, 1000000L for 1MHz?
#endif
However, the TWBR emulation code from wire.h looks like 400KHz is maximum accepted while the "TwoWire::setClock(uint32_t frequency)" routine from wire.ccp shows that 1MHz I2C is possible.
How do I set the I2C wire for 400KHz or 1MHz speed in a proper way, without altering the library ?
thx,
Vasile