Basic i2c on Arduino Due

Hey gang,

I wanted to program and use a CY22150KFZXC (datasheet: http://www.cypress.com/?docID=49450) clock generator using my Arduino Due. The chip is programmed using i2c, and seeing as how Arduino Due comes with i2c functionality, I thought it would be pretty straightforward.

I configured the circuit and confirmed the right bias levels, then tried to program it using this code:

#include <Wire.h>

void setup() {
  Wire.begin();

    Wire.beginTransmission(0x69);
	Wire.write(0x09);
	Wire.write(B00100010);
        Wire.write(0x0C);
        Wire.write(B10001000);
	Wire.write(0x12);
	Wire.write(B00110000);
	Wire.write(0x13);
	Wire.write(B10000000);
	Wire.write(0x40);
	Wire.write(B11000100);
	Wire.write(0x41);
	Wire.write(B11000100);
	Wire.write(0x42);
	Wire.write(B00000000);
	Wire.write(0x44);
	Wire.write(B00000100);
	Wire.write(0x45);
	Wire.write(B00000000);
	Wire.write(0x46);
	Wire.write(B00111111);
	Wire.write(0x47);
	Wire.write(B10001000);
  Wire.endTransmission(0x69);
  
}

void loop() {

}

The slave address of the clock generator IC is 69H aka 0x69. I set up some test i2c commands in my void loop() earlier, and confirmed activity on these pins with an oscilloscope, so I know my wiring is correct. However, whenever I try to mess with the code to see if I can notice any changes, nothing happens. I figure my test circuit is messed up, but I thought I’d come here too and see if anyone can notice anything wrong with my code. But like I said it should be pretty straightforward so I can’t imagine that anything is wrong with it . . . :confused:

Thanks for reading!

To anyone interested:

I had to put delay statements (ex: "Wire.write(8-bit word); delay(1); Wire.write(8-bit word); delay(1);...") between each every command to get it to work. I'm sure there's a better way to fix this, but this is what I used in the end

I believe the endTransmission parameter is incorrect - should be either true or false - false allows repeated start.

0x69 is 1101001 (last bit 1) which may evaluate to true - which would mean that no repeated start so you should be good - however for those of us who are a touch anal-rentative, I would change it from 0x69 to true.

Stan