x-calculator
Circuit 0 uses Updated August 10, 2026

Microcontroller Time Delay Calculator

Advertisement
Advertisement
Microcontroller Clock Frequency
mhz
Desired Timer Run-Time
ms
Single Timer TIC Duration
8-bit Timer Counter Max Run-Time
16-bit Timer Counter Max Run-Time
8-Bit DRT Reload Value
16-Bit DRT Reload Value

This microcontroller delay calculator finds the time a delay loop takes on an 8051 or PIC from the number of machine cycles and the clock frequency. Enter both above.

Formula

Delay = Machine cycles × cycle time
8051 cycle time = 12 ÷ Fosc

Example

On an 8051 at 12 MHz, one machine cycle is 1 µs, so 50,000 cycles = 50 ms.

Related calculators

Frequently Asked Questions

How do I calculate an 8051 delay loop?

Multiply the machine cycles by the cycle time. On a 12 MHz 8051, each machine cycle is 1 microsecond.

What is the 8051 machine cycle time?

It is 12 divided by the oscillator frequency. At 12 MHz that is 1 microsecond per machine cycle.

Is PIC timing the same?

PIC uses 4 clocks per instruction cycle, so the cycle time is 4 divided by the clock frequency instead of 12.

Advertisement
Advertisement
Related

You may also need

All Circuit Calculators
Advertisement