RTC (real-time clock) doesn't sync

uhhm. i have to troubleshoot a project that has a problem with rtc, it has an advance time. so i decided to reprogram the rtc only (using with another arduino). the problem is, the rtc already works after i reprogrammed it(i based on serial monitor and another LCD), but when i tried to install it again to my project. it only displays on the lcd : 165/165/2165 165:165:85. i think the problem is the difference of baud rate of my project to the rtc i reprogrammed. is baud rate really matters?? and what can i do?? please help me..

anyone? :frowning:

Which RTC are you using? Did you try loading an RTC example sketch on the problem system, to ensure that it is really not your code that is flawed?

Do you realize, I2C has no baud rate?

juneth098:
uhhm. i have to troubleshoot a project that has a problem with rtc, it has an advance time. so i decided to reprogram the rtc only (using with another arduino).
...

another arduino, How this one get correct RTC time? Which came first, the chicken or the egg?

Answer for this:

sonnyyu:
RTC is required setup correct time initially.

Using GPS to update RTC and then re-adjust RTC for current timezone.

Using GPS to update RTC and then re-adjust RTC for current timezone. - Programming Questions - Arduino Forum

Using long wave time signal/synchronize with atomic clock

DCF77 out of range? - Sensors - Arduino Forum

sonnyyu:
another arduino, How this one get correct RTC time? Which came first, the chicken or the egg

Not relevant. With the example sketches, you can set the time manually from the serial port.

i already tried it on two different rtc and it works perfectly on another lcd except on my project. the rtc i used is ds1073 e-gizmo(it's in the philippines). i think there's no problem w/ the rtc. some says, i need to reprogram the whole code for the project, but i dont have the copy of the source code and it's very risky.

you mean, it's okay if it's different,right? what could be the problem?? is rtc can be transferrable from one microcontroller(already have a saved prog) to another mcu(also have saved prog)? but i also tried to reset the mcu, so it must be synced already... i really dont know what's the problem. :frowning:

thanks for your response i really appreciate it. :slight_smile:

but DS1073 is a fixed frequency 3-Volt Econ Oscillator/Divider.

so it means that it can be transferred to different mcu with different programs(time-based)??

juneth098:
so it means that it can be transferred to different mcu with different programs(time-based)??

It means you're not using an RTC at all. The digits in part numbers actually mean something. :slight_smile:

Perhaps he meant "e-Gizmo Real Time Clock DS1307 breakout board": http://www.e-gizmo.com/KIT/RTC.html

yes, im exactly using that one

Did you try the approach in reply #4? Does your target system have code installed that is compatible with the RTC? How is it connected? We really need more details.

Your 165/165... indicates the RTC is not connected to your project. You need to provide some coherent questions/answers:

  1. How many RTC modules do you have?
  2. Can you limit to just using one RTC module and testing it across your different Arduino boards? What's the results of such test?
  3. If your RTC tests OK, keeping time on your Arduinos except with the one on you project, I suspect your project has some wiring issues.

1.i have two rtc modules...
2. i tried using it with the other two arduinos and it works flawlessly as shown on my LCD. except on the arduino which is connected on a project.

juneth098:
1.i have two rtc modules...
2. i tried using it with the other two arduinos and it works flawlessly as shown on my LCD. except on the arduino which is connected on a project.

OK, I see a pattern, the arduino on your project is the culprit. Is it possible to replace this arduino with one of the other Arduinos that are working well with the RTC? If this is not working, you will have to post some pictures of your connections. Something is wrong with your project.

Just a wild guess, is your project using an Arduino MEGA but other Arduino boards are UNO? MEGA has I2C connections located differently than I2C on UNO.

when i tried to reset the arduino, it flashes the correct time but it goes back to error time. is sDA and SCL should be interchange??

yeah, and i already know that arduino board have different sda and scl

cant replace it coz there's so many sensors connected to it and i dont have the original code for the project. i was just assigned to correct and replace the faulty RTC.

p.s. it already works before, i just need to readjust the time coz its advance. so i just easily remove the wires connected to the RTC,and reprogram it and tried different RTC and still the error happens.

the project already works before just advance in time, so i reprog it and change its batt. and the error happens, so i decided to replace it with another one but still error happens so i really doubt there's a faulty connections. i guess that i should reprog the whole project to make it sync again, but i dont have the source code for it, and it has too many sensors connected to it, i dont think i can do it.