Describe the role of timers and counters
Timers and counters are used in embedded systems for:
- **Timers**: Measure time intervals, schedule tasks, and trigger events or actions at precise intervals, enabling time-based operations such as delays and periodic functions.
- **Counters**: Track occurrences of events or pulses, often used for counting inputs, measuring frequency, or monitoring occurrences, such as the number of rotations in a motor.
Both are essential for accurate timing and event management in real-time systems.