Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top