How to stop the Counter mode is Timer 1 in the PIC16F877

Status
Not open for further replies.

avinsinanan

New Member
Hello,

I am using the Timer 1 in the PIC16F877. I know that the timer 1 has 2 modes -

1. Timer mode
2. Counter mode

and this can be choosen by setting or clearing the TOCS bit.

However when i choose the counter mode this what i want to accomplish -

1. I was to start counting
2. Then switch off the counter mode
3. Save the current value in the counter and store it in any random register.
4. When we switch off the Counter mode I do not want the Timer mode to come in effect.

Any ideas are welcomed.
Thanks for your time and patience.

Avin Sinanan
 
Clear "TMR1ON" bit in "T1CON" register to disable Timer 1. To enable is set this bit to logic 1.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…