Pavel,
One reason to use timer0_isr_interval would be if you wanted to schedule
multiple events with different timings. The timer0_isr_interval lib
makes it
trivial to have a single interrupt "tick" providing multiple, unrelated
timing
"slots" to trigger those different events. The down side is that you are
effectively polling the slot flags to check whether your slot count has
hit
zero, so it's possible to lose ticks when the processor is too busy to
check
the flags promptly.
The rtc_isr_tmr0 routine is, as you already noted, more accurate, being
dedicated to just the RTC function and using Roman Black's implementation
of the Bresenham algorithm to ensure that the 256-subtract and 24-bit
adds
are optimized for the PIC processor.
Having said that, for cheap, long-term accuracy, it's difficult to beat
the
Maxim DS3231 RTC modules which are available for pennies on eBay
nowadays. They have built-in, temperature compensated crystals and
a stated accuracy of +/-2PPM. Don't feel that you'd be cheating using
one of these... you'd still need to build the I2C interface. :-)
-John-
On Wednesday, July 23, 2014 6:24:47 AM UTC+9, Pavel Milanes Costa wrote:
>
> Hi to all...
>
> I'm building a 7 Segment desk clock as a hobby project, and I ran across
> two methods to get the 1 second increments...
>
> - timer0_isr_interval
> Setting a 1Khz rate and a slot with tick to make one second
>
> - rtc_isr_tmr0
> A "more accurate solution" over time...
>
> There is any pros and cons about one method or the other?
>
> I read that rtc_isr_tmr0 is more accurate over time with jitter on the
> seconds count... but,
>
> This is realy true? any reason to use timer0_isr_interval over this?
>
> cheers
>
> Pavel.
>
--
You received this message because you are subscribed to the Google Groups
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/jallib.
For more options, visit https://groups.google.com/d/optout.