What is Prescaler?

A circuit that divides the clock fed to a timer or similar by a fixed ratio, bringing a fast clock into a range the timer can count.

Field: Embedded Systems & Firmware

Updated: November 13, 2026

Japanese name: プリスケーラ

What a prescaler does

A prescaler is a circuit placed in front of a timer or counter that divides the input clock by a fixed ratio N. For example, dividing a 16 MHz clock by 16 gives 1 MHz, so one timer count is 1 µs. Setting an interrupt every 1000 counts then gives an interrupt every 1 ms. Because a counter has a limited number of bits, counting a fast clock directly makes it wrap around quickly, so long intervals cannot be measured. Coarsening the tick with a prescaler matches the counter's range to the time needed.

Choosing resolution and range

A larger division ratio lengthens the time that can be measured but coarsens the time per count (resolution). With a 16-bit counter at 1 µs per count, the counter wraps after about 65.5 ms. The timer period is division ratio × count ÷ input clock frequency. Configuration differs by microcontroller: some choose from fixed values such as 1, 8, 64, 256 and 1024 (as on AVR), while others allow any ratio through a 16-bit register. Some, like STM32 timers, divide by the register value plus 1, so checking the datasheet is important.

Implementing a prescaler circuit

Power-of-two division can be done with a counter made of a few chained flip-flops, each stage halving the frequency. To divide by an arbitrary ratio N, a counter resets to 0 after counting to N−1 and emits a pulse at that point. In synchronous microcontroller designs, the divided signal is often not used as a new clock but fed to the timer as an enable signal synchronized to the original clock that is active once every N cycles, avoiding clock skew and multiple-clock-domain problems. The same idea is used to generate ADC clocks, watchdog timer ticks and UART baud rates.

Prescalers in RF PLLs

In radio frequency synthesizers, prescalers matter in another sense. VCO outputs are in the GHz range, too fast for a counter with a freely programmable division ratio to run at directly, so a fast prescaler first divides by a fixed ratio P and a slower counter then counts the result. To allow fine selection of the division ratio, a dual-modulus prescaler that can switch between dividing by P and P+1 is used, with a swallow counter setting how many times it divides by P+1, so the overall ratio can be set in steps of 1 as P × N + A. Prescalers are also used to extend the range of frequency counters.

Try it: questions about Prescaler

A timer counts a 16 MHz clock divided by 16 with a prescaler and raises an interrupt every 1000 counts. What is the interrupt interval?

  1. A1 µs
  2. B1 ms
  3. C16 ms
Show answer and explanation

Answer: B. 1 ms

Dividing 16 MHz by 16 gives a 1 MHz timer clock, so one count is 1 µs. An interrupt every 1000 counts gives an interval of 1 µs × 1000 = 1 ms. A prescaler divides a clock that is too fast so the timer can count over a useful range. A 1 ms interrupt is commonly used for timekeeping, reading switches and the RTOS tick.

FAQ

What is a prescaler?

It is a circuit that divides the clock fed to a timer or counter by a fixed ratio. It coarsens the tick of a clock that is too fast so the time until the counter wraps matches the length needed. The correct English spelling is prescaler.

What is the difference between a prescaler and a postscaler?

A prescaler divides the clock before the counter, changing the time per count. A postscaler sits after the counter and counts matches or wraparounds to thin out interrupts and similar events, changing only how often they occur. Some timers have both, such as Timer2 on PIC microcontrollers.

How do I calculate prescaler settings?

Multiply the desired period by the input clock frequency to get the number of clock cycles needed, then split it into division ratio × count that fits the counter's range. For example, 1 ms at 16 MHz is 16000 cycles, which can be a divide-by-16 prescaler and 1000 counts. Watch out for schemes in which the value written to the register is N−1.

Books on Embedded Systems & Firmware Ad

Learn hands-on: parts and kits

Building real circuits is a good way to check what you learned in the questions.

As an Amazon Associate I earn from qualifying purchases.

This page was drafted with AI and fact-checked by a separate AI review before publication. Our Editorial policy explains how we write and check content. If you spot an error, please tell us on our Contact page.

Back to the glossary