TIMERS AND COUNTERS:TIMERS
T IMERS Timer0 will be covered first, and in more detail, as a prototypical timer, and discussion and examples for the use of Timer1 and Timer2 will be provided. The use of timers internal to microprocessors is a bit more complicated than what we have been doing so far because there is a considerable amount of setup required before the timer can be used, and the options for setting the timers up are extensive. We will cover the timers one at a time in an introductory manner. However, you should be aware that there is an entire book available from Microchip Technologies that cov- ers nothing but timers, so the coverage here will be rudimentary. Note The Microchip Technologies timer manual is called The PICmicro Mid- Range MCU Family Reference Book (DS33023), available from Microchip Technology Inc. To understand timers, you must understand how to turn them on and off and how to read and set the various bits and bytes that relate to them. Essentially, in the typical timer applicat...