In My case I simply want to clear timer1 on-the-fly so ClearTimer does not work for that since it stop the timer. To clear the timer without stopping it I must do the following.
TMR1H = 0: TMR1L = 0
.
.
William
Last edit: William Roth 2015-03-05
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Using A PIC, the ClearTimer command not only clears the timer but also STOPS the timer. I think this should be noted in the HELP File.
However, after a ClearTimer command is called, the timer variable is not cleared to 0 but rather to 1.
The clear to 1 anomaly can be fixed by modifying the timer.h subs to set TMR1H and TM1RL bits to zero AFTER the sInitTimer call.
Tested with PIC16F690., AVR not Tested
Examples:
In My case I simply want to clear timer1 on-the-fly so ClearTimer does not work for that since it stop the timer. To clear the timer without stopping it I must do the following.
.
.
William
Last edit: William Roth 2015-03-05