Quote:
Originally posted by WizardOfAz
So, having passed that jewel along, has anyone figured out a safe way to use any of the timers as a RTC?
Bill [/b]
|
I'm pretty sure that IFI has snagged all the timers in the high priority interrupt and isn't going to give us access to them.
There is a routine in user_routines_fast.c which supposedly executes every program cycle. I think this is a timed loop and will give you cycle times faster than the 17ms data update. I was going to run a test to determine that last night but I ran outta steam.
The other way to consider doing this is to use the low priority interrupt to which you have access. You can wire up an oscillator/timer circuit and feed a timer signal to one of the six external interrupt pins.
The third option is to do an old DOS trick and to snag the high priority interrupt vector. You can insert your interrupt vector in place of the existing one. At the end of your ISR, you can call the IFI interrupt vector.
I personally do not plan to use this trick, as the other two methods should provide more reliable results. I suspect that the IFI supplied "every program cycle" function will be sufficient for most purposes.