Loading...
Pages: [1]   Go Down
Author Topic: problem with ds1307 shield and arduino ethernet shield  (Read 1023 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi i'm new in this forum and in the arduino world!
however i'd buy an arduino uno, an ethernet shield w5100 and a ds1307 module. When i use the rtc module with uno all works fine but if i add the ethernet shield the same code doesn't work. I use the standard time library founded in the arduino.cc site.

Someone can help me or have the same problem? Thanks
Logged

Austin, TX
Offline Offline
Faraday Member
**
Karma: 41
Posts: 5165
CMiYC
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

In order to get help, you are probably going to need to post the code you're using.  It would also be helpful to know what shield you are using (where you bought it) and what ds1307 module you are using (where you bought it).
Logged

www.cmiyc.com - A guide to being an Enginerd

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

OK, frist of all: thank you for your reply!
the rtc module is an "Arduino Tiny RTC DS1307 Shield V2.0 Without DS18B20" that can be found on www.emartee.com.
the ethernet shield is "Ethernet Shield 05 for Arduino UNO, Mega, 1280, 2560, use w5100" found on ebay.

the code is very simple:

#include <Wire.h>

#include <Time.h>

#include <DS1307RTC.h>

time_t timeNow;

void setup() {
 
  pinMode(4, OUTPUT);
 
  digitalWrite(4, HIGH);
 
  Serial.begin(9600);
}

void loop()
{
 
  timeNow = (DS1307RTC::get());
 
  Serial.print(day(timeNow));
  Serial.print(":");
  Serial.print(month(timeNow));
  Serial.print(":");
  Serial.print(year(timeNow));
  Serial.println();

  delay(100);
   
   


When the rtc module is connected only to the arduino uno, the code print the correct date but with ethernet shield the value is uncorrect.

time and date of the ds1307 was set frist.

thanks.
Logged

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

noone can help me????? smiley-confuse
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 50
Posts: 3448
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

According to the schematics, it appears there is a pin conflict with the two devices on the A4 and A5 pins on that model ethernet shield (v5). It is the connector J2 that has the additional connections on the v5 ethernet shield. Those are the same pins used by the Wire library for TWI.
http://arduino.cc/en/uploads/Main/arduino-ethernet-shield-05-schematic.pdf

The ethernet shield version 6 does not have the A4 and A5 pin connections.
http://arduino.cc/en/uploads/Main/arduino-ethernet-shield-06-schematic.pdf

add: I would try some "pin bending" on the ethernet shield's A4 and A5 pins if it were mine. Then connect the RTC directly to the Arduino A4 and A5 pins.

« Last Edit: May 13, 2012, 05:49:37 am by SurferTim » Logged

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

Thank you for your suggestions!

I tried to link the rtc module directly to UNO board a5,a4, (a3 and a2 was used for supply voltage) this pins was bended and don't pass through the ethernet shield;
The ethernet shield was connected to the others pins of UNO;

the problem persists in the same way!!! smiley-cry

I can't understand how the ethernet shield can alterate the comunication "I2c" without the connection of a4 and a5 pins!! smiley-eek-blue

If  you have another suggestion, please reply!

Otherwise  , i think to change hardware to an "arduino ethernet" but at this point i don't know if the problem persist with s board!!
There is someone that have used an rtc module whit this board????

thanks a lot.  smiley-lol




 
Logged

Pages: [1]   Go Up
Print
 
Jump to: