Back to ESAcademy Home Page


Microcontroller
Peripheral Timing
Calculator

8051 - Timer 0 and Timer 1

Enter your clock rate and the desired run-time of the timer,
then click on the "Calculate" button

 

Home

News

Training Classes

Products

Consulting

Technical Library

Contact Us

Recommended book:

The 8051 Microcontroller

The calculated rates and values are pure run-time of the timer. No overhead is added for stopping, starting or (re-)loading the timers.

Clock frequency (in MHz): (mhz)
Desired run-time of timer (in milliseconds): (drt)

12-clock parts are regular 8051 derivatives using 12 machine cycles to execute one instruction cycle. Newer devices often are 6-clock parts. They only need 6 machine cycles to execute one instruction cycle.

  Standard
12-Clock Parts
Enhanced
6-Clock Parts
Duration of a single timer tic
(microseconds)

tic12=1/(mhz/12)

tic6=1/(mhz/6)
Maximum run-time of timer
8-bit counter (milliseconds)

max=tic12*256/1000

max=tic6*256/1000
Maximum run-time of timer
16-bit counter (milliseconds)

max=tic12*65536/1000

max=tic6*65536/1000
8-Bit reload value for
desired runtime (milliseconds)

rel=256-(drt/tic12*1000)

rel=256-(drt/tic6*1000)
16-Bit reload value for
desired runtime (milliseconds)

rel=65536-(drt/tic12*1000)

rel=65536-(drt/tic6*1000)
Upcoming Classes
   

© ESAcademy, 2000
Author: Olaf Pfeiffer

All materials
provided 'as is'
see Disclaimer

www.esacademy.com
info@esacademy.com