Timers:-
A timer is a peripheral device that can measure time intervals. Timers can be used to
1. General events at the specific time or to determine the duration of two external events.
eg. Keeping a traffic light green for a specified duration or communicating bits serially between devices at a specific rate.
2. To determine the duration of two external events.
eg. Computing a cars speed by measuring the time the car takes to pass over two separated sensors on a road.
A timer measures time by counting pulses that occur on an input clock signal having a known period.
Counters:-
A counter counts pulses on some other input signal.
eg. A counter may be used to count the number of cars that pass over a road sensor or the number of people that pass through a turnstile.
Timers & Counters are combined to measure rates.
eg. Counting the number of times the car wheel rotates in one second, in order to determine cars speed.