|
Re: Second clock/timer causes red light of death
Are you actually calling your timer interrupt handler from the Interrupt_Handler_Low() in ifi_frc.c? Also, your timer interrupt handler isn't clearing the Timer 1 Interrupt Flag. You need this:
PIR1bits.TMR1IF = 0;
in your interrupt handler to clear the interrupt, or you'll just end up right back in it. Also, also, if you're preloading TMR1L and TMR1H, then you need to preload them again in your interrupt handler, or they'll start counting again from 0 instead of your preloaded value.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.
Lone Star Regional Troubleshooter
|