Quote:
|
Originally Posted by Astronouth7303
I just relized something. In the initialize routines for the timers, the first 2 lines are address setters (I think). Most of mine are 0x00! Does this make a difference?
|
No. Those just mean the timer starts at 0.
Believe I found the problem.
TICKS is declared as char (-127 to 127)
You are checking for 255 as an overflow.
TIME will never increment.
I grabbed Kevins interrupt code and added your code to the interrupt handler.
Only difference is I just declared your globals as static just within interrupts.c for my ease of duplicating your results.
TICKS and AUTOCLOCK increment as you wanted.
In Initialize_Timer_1 I changed:
Code:
PIE1bits.TMR1IE = 1;
T1CONbits.TMR1ON = 1;