For my first Arduino project I just want to communicate with an Analog Devices ADC/DAC using I2C. Before getting that far, I wanted to check that the communication coming out of the Arduino is what I would expect. I'm using SDA/SCL (not the second TWI available on the Due) so there should be no need for any pull up resistors or anything. As far as I understand I should be able to simply call the wire library and run the master_writer sketch and observe the output on an oscilloscope (there is no slave device connected at this point). Here's the code I'm using
#include <Wire.h>
void setup()
{
Wire.begin(); // join i2c bus (address optional for master)
}
void loop()
{
Wire.beginTransmission(4); // transmit to device #4
Wire.write(5); //
Wire.endTransmission(); // stop transmitting
delay(500);
}
On the oscilloscope what I think I should see is two bytes go out, one with the device address, and one with my 'data'. All I'm seeing is the device address, nothing I 'write' makes it out. I've attached a screen shot from the oscilloscope. The yellow is SCL, and green is SDA. As I change the address, the green profile changes, but nothing is impact if I change what is being 'written'. I'm stumped. I've done some reading and searching to see if there is any known issue that would cause this but I haven't come up with anything.
Any help would be appreciated.
Thanks,
Andrew