8051 Timing Counting Calculator

Clock cycle Megahertz (mhz)
Desired timer run time (DRT) Milliseconds (mSec)
Timing TaskStandard 12 Time CycleEnhanced 6 Clock CycleTime
Single Timer
1 / (mhz/12)

1 / (mhz/6)
uSec
8-bit Timing Counter
TIC12 * 256 / 1000

TIC6 * 256 / 1000
mSec
16-bit timer counter
TIC12 * 65536 / 1000

TIC6 * 65536 / 1000
mSec
8-bit recount value
256 - (DRT / TIC12 * 1000)

256 - (DRT / TIC6 * 1000)
mSec
16-bit recount value
65536 - (DRT / TIC12 * 1000)

65536 - (DRT / TIC6 * 1000)
mSec

Mode 0 is a 13-bit timing counting mode, Mode 1 is a 16-bit timing counting mode (the most commonly used mode), Mode 2 is an 8-bit automatic reload initial value counting mode, and Mode 3 is only applicable to T0, dividing the 16-bit T0 into two 8-bit timing counters