Pages: [1]   Go Down
Author Topic: Running I2C and 1-wire devices together  (Read 1152 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is this possible ?

I want to use a DS1307 RTC (I2C) with a DS1820 thermometer and a DS2433 EEPROM (both 1-wire) for a simple data logger.

H/W is not my area of expertise so I am looking for some guidance.

I am confused by conflicting descriptions of the I/F. I have located code examples for each device they just don't look like they can hang together.

Any advice gratefully received.

Chewie
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 639
Posts: 34724
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
they just don't look like they can hang together.

What makes you say that?
I would have thought you can run them both. There is nothing fundamentally mutually exclusive about the two protocols.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

They will work together. I'm working on a home monitoring system that's connected to I2C (RTC & EEPROM), 1-Wire (Temp and A/D) and SPI (DOGM GLCD Display). I have the system working right now with a single 1-wire device, logging to the EEPROM and graphing to the GLCD.

The best approach I found is work on it as spate pieces. 1st get the 1-wire part working (this seems to be the most difficult one of the 3). Once you have that working, then add in the I2C then SPI. As I add each piece, I debug with info out the serial port to make sure everything is still working.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, I'll give it a try. Maybe I am put off by the different coding styles.

Thanks
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 227
Posts: 14007
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

check http://www.ladyada.net/make/logshield/ works like a charm for me, has RTC (I2C) and SDCARD (SPI) I used it for multiple  DS18B20's and some IRQ based counter's and log them on SD-card so I could read the data on my PC
« Last Edit: December 02, 2010, 05:13:09 pm by robtillaart » Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 227
Posts: 14007
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As stated above I used DS18b20's temp sensors that's 1 wire
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Pages: [1]   Go Up
Jump to: