
PROGRAMMING THE PERIPHERALS OF 8051 20-39
10. How can hardware interrupts be made to be edge triggered?
11. What is the role of SBUF in serial communication?
EXERCISES
1. Write the TMOD words for
a) Timer 1 in mode 2 and Timer 0 in mode 1.
b) Timer 1 in mode 0 and Timer 0 in mode 2.
2. Write programs for generating the following. Use the polled mode for timers.
a) A pulse train of period 100 m sec on P2.6.
b) An asymmetric pulse train of 100 µsecs ON time and 220 µsecs OFF time on P2.4.
c) An asymmetric pulse train of 1 secs ON time and 2.3 secs OFF time at P2.6.
3. Generate the pulse trains of Problem 2 using timers in the interrupt ...