Difference between revisions of "5.8051 Timer programming"
| Line 7: | Line 7: | ||
*'''Timer 1''' is also used for generating baud rate in serial communication, which we will discuss in the next tutorial<br />  | *'''Timer 1''' is also used for generating baud rate in serial communication, which we will discuss in the next tutorial<br />  | ||
}}  | }}  | ||
| + | {| class="wikitable" style="background-color:#ffffcc;"  | ||
| + | |-  | ||
| + | ! Register !! Operation    | ||
| + | |-  | ||
| + | | T0 || Timer 0   | ||
| + | |-  | ||
| + | | T1|| Timer 1   | ||
| + | |-  | ||
| + | | TCON || Timer Control  | ||
| + | |-  | ||
| + | |TMOD||  Timer Mode  | ||
| + | |}  | ||
==Timer Counter Operation==  | ==Timer Counter Operation==  | ||
{{Box|type=l_green_light|text=<br/>  | {{Box|type=l_green_light|text=<br/>  | ||
}}  | }}  | ||
Revision as of 21:25, 26 December 2013
In this tutorial we will see 8051 timers. We will use the 8051 timers to generate a precise delay of 1 sec.
8051 timers/counters
The 8051 has 2 timers/counters.
- They can be used to generate precise timing, i.e., we can measure time between events. The unit is then called timer.
 - It can also be used to count external events, known as counter.
 - Timer 1 is also used for generating baud rate in serial communication, which we will discuss in the next tutorial
 
| Register | Operation | 
|---|---|
| T0 | Timer 0 | 
| T1 | Timer 1 | 
| TCON | Timer Control | 
| TMOD | Timer Mode | 
Timer Counter Operation
