[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  Electronics
. -> [Folder]  Microprocessors
. . -> [Subject]  interfacing DS1682 Elapsed time counter
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

interfacing DS1682 Elapsed time counter

Postings by administrators only.

[Refresh] Refresh page


Posted by Pragadheeswaran   (1 post)  [Biography] bio
Date Mon 26 Sep 2011 02:19 PM (UTC)
Message
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 .
[Go to top] top

Posted by Nick Gammon   Australia  (21,407 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Mon 26 Sep 2011 10:11 PM (UTC)
Message
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);
}


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


3,108 views.

Postings by administrators only.

[Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]