No announcement yet.

Timer Accuracy

  • Filter
  • Time
  • Show
Clear All
new posts

  • Timer Accuracy

    I presume the system timers are based upon the crystal locked system clock?

    If so, from the specs, gives them an accuracy of 30ppm, which if used as a normal clock would give a max drift of 15.77 seconds per year, which seems to me to be 'reasonable'.

    If the above holds, how can I maintain the accuracy of the timer, by that I mean how can I 'reset' it to keep it ticking over in such a way as to not lose the occational millisecond or two?

    eg. I imagine

    sys_SetTimer(0,sys_GetTimer(0)+10000) ;

    Will occasionaly lose a millisecond (or perhaps more)

    Can the timer be set to freerun? i.e. not stop at 0, (and perhaps, ideally, auto reseting to 30000 after reaching 0)

  • #2

    I don't think the internal timers in the Picaso were intneded to be used in this manner. You could however use an external i2c type clock module such as this: 3286.m63.l1177

    The specs reckon it's within 15ppm. The advantage of using this module is that is battery backed and you'd get full millisecond/second/minute/hour/day/month/year.


    • #3

      sys_T() is a free-running timer.