interfacing DS1682 Elapsed time counter

Posted by Pragadheeswaran on Mon 26 Sep 2011 02:19 PM — 2 posts, 14,615 views.

#0
I am interfacing the DS1682 Elapsed Time counter with i2c interface , but it is not seems to be working any one please help me , my part code is below ...

void printetc()
{
Wire.beginTransmission(0b1101011);
Wire.send(0x09);
Wire.send (0b11010111);
int second = Wire.receive();
Wire.endTransmission();
Serial.println(second);
}

But it identify s the device and its address , hope i am missing something big .
Australia Forum Administrator #1
I prefer to answer general questions about the Arduino on the Arduino forum, that way the knowledge-base isn't split across multiple sites.

http://arduino.cc/forum/

However something obviously wrong is that you have to do endTransmission before doing a receive. That is:


void printetc()
{
Wire.beginTransmission(0b1101011);
Wire.send(0x09);
Wire.send (0b11010111);
Wire.endTransmission();

int second = Wire.receive();
Serial.println(second);
}