Looks good. I had something similar casualties\18f452_timer3_rtc.jal, I am unable to test it as I don't have a good oscillator or maybe I just need to change the OSCCAL register. If my code is correct, it would be 100% accurate (except for the oscillator. Your ISR is smaller :)
That suggestion you have about adjusting it remotely seems like a good idea. I guess you would do it via serial port, and maybe tune it to one of the accurate clocks on the net. Matt. On Jul 31, 6:24 pm, Eur van Andel <[email protected]> wrote: > On 31 Jul 2010, at 22:08 , mattschinkel wrote: > > > Good job on the RTC lib Rob. How accurate is it? > > I have to thank Rob as well, for beautifying my code for rtc_isr_tmr0. > > I just submitted a much better rtc_isr_tmr3, since I had used TMR0, > TMR1 and TMR2 in my current project. The ISR is only 5 lines and > contains no assembler. It works too. See sample: 18f2620_rtc_tmr3.jal > > This has a 0.6% jitter and an accuracy of 2ppm @ 20 Mhz. You can > adjust this value: > > > const _rtc_cycles_per_second = (target_clock / 4) > > If your xtal is not precise. > > Now I'm going to ask William to make me some Python code to remotely > adjust the RTC. > > --- > ir EE van Andel [email protected] http://www.fiwihex.nl > Fiwihex B.V. Wierdensestraat 74, NL7604BK Almelo, Netherlands > tel+31-546-491106 fax+31-546-491107 -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
