
PROGRAMMING THE PERIPHERALS OF 8051 20-19
We have done an elaborate study of timers working in mode 1 and mode 2. Mode 0
has no special use, while mode 2 is used only for specific purposes. Now, we will go to
the next application of the timer unit, i.e., its use as a counter.
20.4 | Counter Programming
As a counter, the timer unit performs counting of external events. An event is a pulse,
but the source of the pulse is not the clock of the 8051 but an external source.
The practical application of counting is that any action can be converted into a
pulse, for example, for counting people who pass through a door, a detection mechanism
can generate ...