Clock Frequency Calculator
Calculate clock period, instruction throughput, and timer settings from an oscillator or PLL frequency.
MHz
CPI: 1 for ARM Cortex-M, 4 for classic AVR
Clock Period
62.50 ns
Instructions per Second16.0 MIPS
Timer Tick Frequency250,000.0 Hz
Timer Tick Period4.000 µs
Clock Period vs Clock Frequency
Clock Frequency and Timer Calculations
The clock frequency determines the speed of all operations in a microcontroller.
Formulas
Clock Period = 1 / Frequency
MIPS = Clock Frequency / Cycles per Instruction
Timer Frequency = Clock / Prescaler
Prescalers divide the clock to create slower timer ticks, useful for generating precise time intervals without consuming CPU cycles.
Example Calculation
16 MHz clock, 1 CPI (ARM Cortex-M), prescaler of 64.
- 01Clock period: 1 / 16e6 = 62.5 ns
- 02MIPS: 16e6 / 1 = 16 MIPS
- 03Timer frequency: 16e6 / 64 = 250,000 Hz
- 04Timer tick: 64 / 16e6 = 4.000 microseconds
Frequently Asked Questions
Learn More
Ohm's Law Guide
A complete guide to Ohm's Law. Learn the relationship between voltage, current, and resistance, with practical examples, the power triangle, and circuit analysis tips.