8051 timing counting calculator

clock cycle Megahertz (mhz)
required timer run time (drt) Milliseconds (mSec)
timed tasksstandard 12 timeframeenhance 6 clock cyclestime
single timer
1 / (mhz/12)

1 / (mhz/6)
uSec
8-bit timer 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 count 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, mode 3 is only applicable to t0, and the 16-bit t0 is divided into two 8-bit timer counters