PIC microcontoller 16f877a

holnis

Joined Nov 25, 2011
49
Each PIC microcontroller has up to three timers that you can either use as a timer or a counter (Timer 1 & 2) or a baud

clock (Timer 2).
 

muaz89

Joined Feb 4, 2012
6
I want to ask a question, I would like to use PIC16F877A and I need a timer .. do I need to put the timer circuit 555 on me or I just need to use the coding "delay" to the PIC ..

sorry, I am still new to this microcontroller field ..
 

spinnaker

Joined Oct 29, 2009
7,830
The PIC16F877A has two timers. Check your datasheet. Search for Pic timers. There are plenty of tutorials.

Post back if you have other questions after reading up on timers for Pics.

And there are a couple of threads in this forum on timers too.

And don't hijack someone else's thread. If you have a question start your own thread.
 

John P

Joined Oct 14, 2008
2,025
The PIC16F877A has two timers...
Not that I'm calling Spinnaker a two-timer or anything, but actually it's three.

And any time you need more than one timer, you might do better to use just one but divide it down to get the rates you want. So you'd get an interrupt at a rate of (let's say) 10000 per second, and you'd take every 10th one to get 1000/sec, or every 50th one to get 200/sec, and so forth. It has the advantage that you only have to enable one interrupt, and the number of timed events you can control is pretty much unlimited (64 would be no problem). But as always, "it depends".
 
Last edited:

spinnaker

Joined Oct 29, 2009
7,830
Not that I'm calling Spinnaker a two-timer or anything, but actually it's three.

And any time you need more than one timer, you might do better to use just one but divide it down to get the rates you want. So you'd get an interrupt at a rate of (let's say) 10000 per second, and you'd take every 10th one to get 1000/sec, or every 50th one to get 200/sec, and so forth. It has the advantage that you only have to enable one interrupt, and the number of timed events you can control is pretty much unlimited (64 would be no problem). But as always, "it depends".
Oops you are right. Hey it was late last night when I looked at the data sheet! :)
 
Top