Pages: [1]   Go Down
Author Topic: Accurately Syncing Due RTC with GPS PPS  (Read 654 times)
0 Members and 1 Guest are viewing this topic.
UK
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
Has anyone achieved accurately syncing the built in RTC of the Due with a GPS connected with both serial and digital pulse per second.
I have done this easily on PC's but on the Due I can't seem to get the accuracy. The difference varies up to a second.
Basically I start a timer when the rising edge of the PPS is detected, retrieve the updated time from the serial port, decode it, add 1 second and then prepare the RTC register data. Then just before telling the RTC to continue I wait until the delay from the PPS is exactly 1 second.
I am only looking for millisecond accuracy, but currently it is averaging 0.5 seconds and is in no way consistent.
It seems to me that perhaps, when updating the RTC, that the internal count is not reset and just continues when the new time is loaded, thus giving me the variable time difference.
Have searched the Amtel Sam data sheet but have not found any confirmation of this.
Does anybody know?
Logged

Pages: [1]   Go Up
Jump to: