Expect to come across this popular microcontroller basic interview questions. Timers and counters are two types of peripheral devices used by microcontrollers. A timer tracks and measures the passage of time, with its purpose being to impose a delay or wait period before sending a signal further. This delay is most often calculated according to the frequency of an internal system clock. Conversely, counters measure pulses' frequency by counting signals from outside sources such as motors or encoders. They usually operate on pulse width modulation - measuring how wide the external pulses are that are coming in - and then generating a control signal based on these measurements. Altogether, both timers and counters offer special functionality that can be tuned to assist in various applications within a microcontroller