Wire library - timing problem

Hi! I'm driving a MAX 6956 with Arduino, using the Wire library.

After many days of software and hardware debugging, also with a i2c logic state analyzer that confirms that the i2c data go correctly trough the SDA/SLC lines, I solved the problem about right communication between arduino and MAX 6956.

Using the standard syntax:

Wire.begin(); Wire.beginTrasmission(Max6956Address); Wire.send(commandbyte1); Wire.send(databyte1); Wire.send(commandbyte2); Wire.send(databyte2); ... Wire.endTransmission();

it happens that, sometimes, the MAX not recognize the commands send by arduino. So, I try to divide every command+databyte sequence in a single transmission:


Wire.beginTrasmission(Max6956Address); Wire.send(commandbyte1); Wire.send(databyte1); Wire.endTransmission();

Wire.beginTrasmission(Max6956Address); Wire.send(commandbyte2); Wire.send(databyte2); Wire.endTransmission();


Now the MAX works correctly... but why?

It's a Wire library timing problem? It's a wiring problem?

The device get wired togheter with other two MAX 6956 in a experimental breadboard, but the wires are very short and the acquired i2c signals was clearly visible in the (usb) i2c logic state analyzer window over the PC.

The Wire library can be used with the Timer library? This can affect the program? I've to use a ::stop before the i2c transmission and the ::start instructions after the one?

Michele Guerra - Italy

I have another problem with wire libary. I use Arduino Mega + software 0016, and when i use the command Wire.endTransmission the programm stop. Nothing happens. Before i use this command the sda and scl pin have HIGH level (5V), after this command the sda and scl have(0,015V) LOW signal. I try some pullup resitos. nothing happens. Is there a bug in this lib ?