Timer measures time intervals to generate timed output events (e.g. hold traffic light green for 10 s) and to measure input events (e.g., measure a car’s speed). It is based on counting clock pulses:
- E.g., let Clk period be 10 ns
- And we count 20,000 Clk pulses
- Then 200 microseconds have passed
- 16-bit counter would count up to 65,535*10 ns = 655.35 microsec., resolution = 10 ns
- Top: indicates top count reached, wrap-around.