I2C question

I’m trying to decrease the number of bits that have to be sent over I2C (in order to reduce latency issues). I’m using an Intel Galileo Board with one I2C slave device (the slave device is an A/D converter). The slave device only needs to receive commands from the Galileo Board.

The slave device waits for a falling edge. When it detects a falling edge, it begins an A/D conversion.

Since there is only one I2C slave device, I am wondering if the command Wire.beginTransmission(44) only needs to be sent once?

I would like to know if the code below would work. I don’t have an oscilloscope to use for observing the output on the SDA pin.

(I’m not showing the code for reading the bits from the A/D converter because I’m not going to use I2C to read the bits. Reading the bits will be done using Digital Read commands)

#include <Wire.h>

byte val = 0;

void setup()
{
  Wire.begin(); // join i2c bus
  Wire.beginTransmission(44); // transmit to device #44 (0x2c)
}

void loop()
{
  Wire.write(1); 
  //read data from A/D converter (code not shown because it's unrelated to question)


}

You should also post a little about the ADC you are communicating with. Look at the data sheet of the device and see if it has an option of repeated start?

Timing diagram on the data sheet will help you understand, if a stop condition is required and if the device provides you an option of repeated start.

The A/D converter is the MCP3201.

The SDA wire would be connected to the CS pin on the MCP3201. So, the A/D converter would begin and A/D conversion on the falling edge of SDA.

Since the SDA sends a byte, the CS pin may receive multiple rising and falling edges. The program would begin reading data from the A/D converter after the last falling edge.

Data is read into the Galileo Board using DigitalReads (no with the SDA wire).

The data sheet states that the device uses a simple serial interface compatible with the SPI protocol. Why are you using I2C ?
SPI runs at much higher frequencies than I2C and can transfer much more data. Alas ofer shorter distances.