SparkFun Forums 

Where electronics enthusiasts find answers.

Hardware or product specific questions are best asked here.
User avatar
By naltieri
Hi Paul, look forward to try the BETA version, so the aspect which is still confusing is that as the RTC provides a time stamp for hours, minutes, seconds and decimal seconds to 2 decimal places, and the microsecond log uses an internal counter to provide a microsecond time stamp, which starts at the forth decimal place how does one obtain the millisecond count which would be the 3rd decimal place. Adding the RTC time stamp and log micro time stamp is ok but seem to be missing the milliseconds from the data, Thanks Nick
User avatar
By PaulZC
Hi Nick,
"micros" is a count of microseconds. It starts at zero each time the Artemis is reset, increases by 1 every microsecond, until it reaches 2^32 - 1 = 4294967295. Then it "wraps round" back to zero and repeats.
The RTC is different. It always keeps running, so long as the Artemis has power (from its back-up battery). The RTC only provides a resolution of 0.01 seconds. The RTC is only updated when the user sets the time through the menus.
There will be a discontinuity between the RTC and micros. E.g. if the user sets the RTC time to 09:00:00.00 when micros is at 12345678, then: if you "add" the last four digits of micros to the RTC time; at the second roll-over you will see:
So, in summary, to get _absolute_ time, you need to use the RTC data. Micros will give you the microsecond-resolution _relative_ timing from reading to reading.
There is no way to give you what you really want (true RTC time with microsecond resolution) using just the Artemis. RTC + micros is the best we can do.

A GNSS module will give you better resolution. u-blox GNSS modules can provide nanosecond-resolution time. The OpenLog Artemis firmware can read time (and position) from a u-blox module, but, at the moment, only millisecond resolution is provided. It would be possible to upgrade the code to support GNSS microseconds.
**BUT**, even then, there is a problem. Yes, the module can provide nanosecond resolution, but it can only provide messages at the "navigation rate". Usually this is 1Hz but OpenLog Artemis supports up to 10Hz. So you get nanosecond resolution timestamps in 0.1 second increments.
So even a GNSS module cannot provide the exact time _now_ with nanosecond resolution.

I think you might be asking for the impossible?
Best wishes,
User avatar
By naltieri
Dear Paul,
Thanks for the detailed explanation, it sounds like it is only possible to get a relative time using the micros log data, not absolute time, so two sequential time stamps as an example from the Artemis with a 100 milli second delta is given below. With the micros log data, as the micros log is independent from the RTC it sounds like this only provides a relative difference between two subsequent readings. I dont follow the math of how the micros log data is added to the RTC data.
So I'm more interested in being able to know the absolute time stamp with millisecond resolution,
I also have several U-blox GNSS modules but as pointed out these have nanosecond resolution by only stream at max 10Hz. Perhaps I need an upgraded RTC which when synchronized to GNSS offers 1ms time stamp resolution. Thanks for your guidance but sounds like the onboard RTC doesn't quite provide enough resolution.
Best Regards,
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]