Specifications
mikroElektronika | Free Online Book | PIC Microcontrollers | Chapter 4: Timers
● TOC
● Introduction
● Ch. 1
● Ch. 2
● Ch. 3
● Ch. 4
● Ch. 5
● Ch. 6
● Ch. 7
● Ch. 8
● Ch. 9
● App. A
● App. B
● App. C
Chapter 4: Timers
The timers of the PIC16F887 microcontroller can be briefly described in only one sentence. There are three completely
independent timers/counters marked as TMR0, TMR1 and TMR2. But it’s not as simple as that.
Timer TMR0
The timer TMR0 has a wide range of applications in practice. Very few programs don't use it in some way. It is very
convenient and easy to use for writing programs or subroutines for generating pulses of arbitrary duration, time
measurement or counting external pulses (events) with almost no limitations.
The timer TMR0 module is an 8-bit timer/counter with the following features:
● 8-bit timer/counter;
● 8-bit prescaler (shared with Watchdog timer);
● Programmable internal or external clock source;
● Interrupt on overflow; and
● Programmable external clock edge selection.
Figure 4-1 below represents the timer TMR0 schematic with all bits which determine its operation. These bits are stored in
the OPTION_REG Register.
http://www.mikroe.com/en/books/picmcubook/ch4/ (1 of 12)5/3/2009 11:32:57 AM