Specifications
mikroElektronika | Free Online Book | PIC Microcontrollers | Introduction: World of Microcontrollers
Fig. 0-29 Using prescaler in timer operating
Using the interrupt in timer operation
If the timer register consists of 8 bits, the largest number that can be written to it is 255 (for 16-bit registers it is the number 65.535). If this
number is exceeded, the timer will be automatically reset and counting will start from zero again. This condition is called overflow. If enabled
from within the program, such overflow can cause an interrupt, which gives completely new possibilities. For example, the state of registers used
for counting seconds, minutes or days can be changed in an interrupt routine. The whole process (except interrupt routine) is automatically
performed “in the background”, which enables the main circuits of the microcontroller to perform other operations.
http://www.mikroe.com/en/books/picmcubook/ch0/ (23 of 30)5/3/2009 11:28:39 AM