Friday, February 29, 2008

Functions of Timer

The 8051 microcontroller incorporates two general purpose programmable 16-bit timers/counters. they are termed as Timer 0 and Timer 1.

We can configure timers in four operating modes by program. Also, we can initialize timer, start timer or stop timer as per our requirement by program. All this features places timers in a category of programmable timers.
All three Major Functions of timers are explained here.

(1) Time Delay and Measuring Time

Timer can be used to generate required time delay between two events. It can be also
used to measure time duration between to events. These functions of a timer is purely
described as a “Timer”.

(2) Counting the External Event

Timer can be used to count any external events. When timer is used to count external
event, it is known as “Counter”.

(3) Baud Rate Generation

Serial communication requires defined baud rate. Timer 1 is used for baud rate
generation. Timer 0 is not intended for this function.

No comments: