•Timers are usually initialized once at the beginning
of the program to set the correct operating mode.
•Then, within the body of a program, the timers are started, stopped, flag bits are tested and cleared,
timer registers read or
updated, and so on, as required in the application.
•First register to be initialized is TMOD to set the mode
of operation e.g.,
• MOV TMOD,
#00010000B ; sets Timer 1 in mode 1, leave C/T = 0 and GATE = 0 for internal clocking, and clears the Timer 0 bits.