Yes, that should make Timer1 keep time with a watch crystal.
Assuming 100 other things are correct ...
Code:
T1CON.5 = 0 ' Setup TMR1 timings 1:1
T1CON.4 = 0 ' Setup TMR1 timings 1:1
T1CON.3 = 1 ' Oscillator is ON (LP OSC Mode)
T1CON.2 = 1 ' do not Synchronize external clock input
T1CON.1 = 1 ' External clock from pin RC0
T1CON.0 = 1 ' Enables Timer1
Of course, the timer will only tick every 2 seconds, unless you reload the timer each time it overflows.
You've added capacitors to the crystal right? ...
You're responding to the overflow flag? ...
The TMR1IE enable bit isn't set? ...
I'm guessing without the program again ...
<br>
Bookmarks