Updating RTC at every 24hours

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all,

 

I have a project I am using RTC and GSM interfaced. I need to update RTC time by getting GSM time at every 24hour (Say at 12AM). In the sense when date changes I have to update my RTC Time.

 

What method can I use?

 

I am using Atmega164A, GSM900A,

 

Please help me in this.

 

 

Thank you In advance.

Last Edited: Fri. Apr 21, 2017 - 03:35 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

SNAP!

 

My Google was "get network time using sim900" and that thread was the top hit for that too :-)

 

The same search hit a load of useful looking threads. A brief summary is given in this:

 

https://importgeek.wordpress.com...

 

So the bottom line of it all:

AT+CCLK?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I would suggest sync'ing your time shortly after 2 am, that way you will also automagicly adjust for standard/daylight savings as well as correcting for any clock drift.

Jim

 

 

Mission: Improving the readiness of hams world wide : flinthillsradioinc.com

Interests: Ham Radio, Solar power, futures & currency trading - whats yours?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
So the bottom line of it all:

AT+CCLK?

Not sure I trust that.

 

AT+CCLK is a GSM 07.07 Standard command: it usually relates to the module's local RTC - not the Network time.

 

The Blog refers to using AT+CENG to turn on "Engineering Mode". The SIM900_AT Command Manual_V1.11.pdf says nothing to indicate that this sets the RTC

 

http://simcom.ee/documents/?dir=...

 

 

But one thing is certain: it has nothing specifically to do with AVR.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Fri. Apr 21, 2017 - 03:23 PM