Page 9 - DEC40053 Ebook_Timer
P. 9

What is Timer?






            Timers             in      microcontrollers                      are         used          for

            introducing  delay,  counting  events,  generating

            waveforms, and also PWM generation.







           There are 4 timers that can be selected to use in


           PIC18F

                  Timer0 (TMR0): 16-bit


                  Timer1  (TMR1) : 16-bit

                  Timer2  (TMR2) : 8-bit

                  Timer3  (TMR3) : 16-bit






           The timer can be used either::

               1.  As timers generate a time delay

              2.    As  counters  to  count  events  happening


                  outside the microcontroller.





           Every timer needs a clock pulse to tick.

            It is used to count clock signals coming into it.





           Source of the clock signal:


               1. From pins OSC1 and OSC2 or

              2.  Pin RA4/T0CKI or


              3.  Pin RC0/T10S0/T1CKI





                                                           -2-
   4   5   6   7   8   9   10   11   12   13   14