Become a subscriber (Free)

Join 29,000 other subscribers to receive subscriber sale discounts and other free resources.
Don't worry -- your e-mail address is totally secure. I promise to use it only to send you MicroZine.

PIC Timer 2 calculator

This timer calculator is not available at the moment as the tcl plugin is not supported anymore.
The pic timer code will be put into a separate tcl program soon that you can download.

With the PIC Timer 2 calculator you can see the resulting frequencies and periods when you change four pieces of information. :

  • Frequency (the default is 4MHz).
  • The Prescaler ratio.
  • Timer 2 period register value.
  • The Postscaler ratio.

Jump to PIC Timer 0 calculator.
Jump to PIC Timer 1 calculator.

PICTimer 2  Block diagram [from 33023a.pdf]
PIC Timer 1 block diagram 33023a.pdf

PICTimer 2 registers 
[from 33023a.pdf]
PIC timer 2 registers

Three sliders let you change the values by dragging a control up and down on the screen and the resulting changes are immediately shown in this page.   The first is for the prescaler, the middle is for the Period register and the last is for the postscaler.

Note: Setting of timer 2 value is not shown as the intended use of the timer is for making it easy to control the period of TMR2 using the period register - taking away the need to service interrupts in order to generate a specific frequency.

All you do is set the Prescaler and Postscaler and set the period register PR2.  For example if you set Prescaler=1:1 and Postscaler=1:1 and PR2=99.  The output period of the  module would be 100us i.e. a Timer 2 interrupt every 100us.

Note: Timer 2 counter is reset on the next count after matching PR2 (this is why you need PR2=99 and not 100).

The important point is that there will be no need to set any registers within the interrupt (as you have to do with the other timers).  This is why it is used as the baud rate generator for the USARTs - it requires no processing.

Screen shot of PIC Timer 2 calculator in action

PIC Timer 2 calculator

Jump from PIC Timer 2 calculator to
Best-Microcontroller-Projects Home Page

New! Comments

Have your say about what you just read! Leave me a comment in the box below.

Claim Your: Useful

"Arduino Software Guide"

   Right Now...

Privacy Policy | Contact | About Me

Site Map | Terms of Use

Sign up for MicroZine
''The'' Microcontroller Newsletter

Enter your first Name and primary email address in the form below:

And receive absolutely FREE a full project for:

"Measuring Analogue Voltages
Without An ADC"

(Using only one pin).

Instant Download:
You Can
Get It Right Now

Warning: This project could be  Removed 
at any time.  

It will  NOT be 
available indefinitely SO
To avoid 
disappointment  get it:


Don't worry -- your e-mail address is totally secure. I promise to use it only to send you MicroZine
Remember this is a project with full description and fully debugged C Source code - and it's not available from the main website.

You can only get it through this newsletter.

To get exclusive access Enter your first name Name and primary email address Now in the form above.:

But wait !

There's more...

You'll receive more
free and exclusive reports as well as site information and site product updates

Scroll up to the form above and sign up NOW. Don't forget it's FREE and if you don't like it, you can unsubscribe at any time.

Click Here Now to use the form above to get your Valuable information absolutely free.

Readers Comments

"I wanted to thank
you so so so much
for all the information
you have provided in
your site it's


- Ranish Pottath

"This site really is
the best and my favorite.
I find here many useful
projects and tips."

- Milan


"Awesome site,
very, very easy and nice
to navigate!"

- Matt

Learn Microcontrollers

"Interested in

Sign up for The
Free 7 day guide:


"I am a newbie to PIC
and I wanted to say
 how great your
site has been for me."

- Dave


"Your site is a great
and perfect work.

- Suresh


"I couldn't find the correct
words to define
yourweb site.

Very useful, uncovered,
honest and clear.

Thanks so much for
your time and works.

- Anon

Recent Articles

  1. Nail Finder Circuit

    Nail Finder Circuit: How to find nails in walls using a radar circuit not electromagnetic (very simple).

    Read more

  2. Magnetic Potentiometer

    Magnetic potentiometer : How to create a potentiometer that does not use resistance.

    Read more

  3. A PIC Serial LCD project.

    How to create a serial LCD module using the PIC microcontroller's built in USART.

    Read more