•Timer is a series of divide-by-two flip-flops that receive an input signal as a
clocking source.
•Clock is applied to the first flip-flop, which gives output divided by 2.
•That output of first flip-flop clocks the second
flip-flop,which
also divides it by 2 and so on.
•The output of the last stage clocks a timer overflow flip-flop, or flag, which is
tested by the software.
•It is like a counter. A 16-bit timer would count from
0000H to
FFFFH. The overflow flag is set on the FFFFH-to-0000H count.
•There are two timers in 8051 i.e., T0 and T1.
•Four modes of timer operations.