Discussion
What steps are followed when we need to turn on any timer ?
Answer: B
The steps are: load the TMOD register, load the count, start the timer, keep monitoring it, stop the timer.
On the 8051, a timer is used as follows:
- Load TMOD to select the timer, its mode (for example 16-bit mode 1) and whether it counts as a timer or counter.
- Load the initial count into TH and TL.
- Start the timer by setting TR0 or TR1 in TCON.
- Monitor the overflow flag TF0 or TF1 (or use the interrupt).
- Stop the timer by clearing TR, and clear the TF flag.
Leaving out TMOD leaves the mode undefined. Starting the timer before loading the count makes it count from the wrong value. 'Divide TCON by 2' is not an operation; TCON holds control bits, not a count.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development