0
\$\begingroup\$

I have 2 different microcontrollers and I need to use their internal RTC. however I need the 2 RTC's to be in sync when they are used. How would I achieve something like this?

\$\endgroup\$

closed as too broad by PeterJ, Nick Alexeev, Daniel Grillo, Chetan Bhargava, Matt Young Mar 8 '14 at 20:49

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    \$\begingroup\$ How are they connected together and what type of MCUs are they? Do you have external time sources available like GPS or Internet time servers etc? \$\endgroup\$ – PeterJ Mar 8 '14 at 12:53
  • \$\begingroup\$ How closely synchronised? would a femtosecond difference cause a catastrophe? \$\endgroup\$ – RedGrittyBrick Mar 8 '14 at 17:51
  • \$\begingroup\$ About a couple of microseconds \$\endgroup\$ – Developer Android Mar 9 '14 at 5:48
3
\$\begingroup\$

For distributed system, the common solution is using a GPS disciplined clock. There are many embedded GPS receiver modules from different companies which provide timing information and a 1 PPS signal. A module built specifically for timing usually includes an OCXO for stability. One such module is the Trimble Thunderbolt ($$$). It all depends on the timing precision you require, few milliseconds will be cheap, few microseconds will be expansive. Also, if you have an Ethernet connection, IEEE 1588 (PPTP) is worth a consideration.

\$\endgroup\$
1
\$\begingroup\$

If you have some form of data communication channel between the two MCUs then one can report to the other what the time is and if the error is small do nothing else make an adjustment.

Alternatively you can use IRIG. From the link: -

Inter-range instrumentation group time codes, commonly known as IRIG timecodes, are standard formats for transferring timing information. Atomic frequency standards and GPS receivers designed for precision timing are often equipped with an IRIG output. The standards were created by the TeleCommunications Working Group of the U.S. military's Inter-Range Instrumentation Group (IRIG), the standards body of the Range Commanders Council. Work on these standards started in October 1956, and the original standards were accepted in 1960.

IRIG receiver: -

enter image description here

It's not some Pie in the sky idea - my company use them on a lot of telemetry systems for time-stamping data. You have a common RF receiver and this distributes data to several MCUs in serial format.

\$\endgroup\$
  • \$\begingroup\$ That seems interesting. However the issue is that the MCU's are spaced quite a distance apart and running a serial cable to each and evry one of them would be very difficult. Are there any low cost GPS receivers which only measure the time stamp and not do anything else which I can use for time synchronization? If not is there any other way to achieve this? \$\endgroup\$ – Developer Android Mar 8 '14 at 14:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.