figure 4–1 a 3-bit timer. (a) schematic. (b) timing...
TRANSCRIPT
The 8051 Microcontroller, 4e
By I. Scott MacKenzie and Raphael C.-W. Phan
© 2007 Pearson Education, Inc.
Pearson Prentice Hall
Upper Saddle River, NJ 07458
FIGURE 4–1 A 3-bit timer. (a) Schematic. (b) Timing diagram.
The 8051 Microcontroller, 4e
By I. Scott MacKenzie and Raphael C.-W. Phan
© 2007 Pearson Education, Inc.
Pearson Prentice Hall
Upper Saddle River, NJ 07458
FIGURE 4–2 Timer modes (a) Mode 0 (b) Mode 1 (c) Mode 2 (d) Mode 3
The 8051 Microcontroller, 4e
By I. Scott MacKenzie and Raphael C.-W. Phan
© 2007 Pearson Education, Inc.
Pearson Prentice Hall
Upper Saddle River, NJ 07458
FIGURE 4–3 Clocking source
The 8051 Microcontroller, 4e
By I. Scott MacKenzie and Raphael C.-W. Phan
© 2007 Pearson Education, Inc.
Pearson Prentice Hall
Upper Saddle River, NJ 07458
FIGURE 4–4 Starting and stopping the timers
The 8051 Microcontroller, 4e
By I. Scott MacKenzie and Raphael C.-W. Phan
© 2007 Pearson Education, Inc.
Pearson Prentice Hall
Upper Saddle River, NJ 07458
FIGURE 4–5 Timer 1 operating in mode 1
The 8051 Microcontroller, 4e
By I. Scott MacKenzie and Raphael C.-W. Phan
© 2007 Pearson Education, Inc.
Pearson Prentice Hall
Upper Saddle River, NJ 07458
FIGURE 4–6 Waveform for example
The 8051 Microcontroller, 4e
By I. Scott MacKenzie and Raphael C.-W. Phan
© 2007 Pearson Education, Inc.
Pearson Prentice Hall
Upper Saddle River, NJ 07458
FIGURE 4–7 Buzzer example
The 8051 Microcontroller, 4e
By I. Scott MacKenzie and Raphael C.-W. Phan
© 2007 Pearson Education, Inc.
Pearson Prentice Hall
Upper Saddle River, NJ 07458
FIGURE 4–8 Timer 2 in 16-bit auto-reload mode
The 8051 Microcontroller, 4e
By I. Scott MacKenzie and Raphael C.-W. Phan
© 2007 Pearson Education, Inc.
Pearson Prentice Hall
Upper Saddle River, NJ 07458
FIGURE 4–9 Timer 2 in 16-bit capture mode
The 8051 Microcontroller, 4e
By I. Scott MacKenzie and Raphael C.-W. Phan
© 2007 Pearson Education, Inc.
Pearson Prentice Hall
Upper Saddle River, NJ 07458
FIGURE 4–10 Timing for modified buzzer example
The 8051 Microcontroller, 4e
By I. Scott MacKenzie and Raphael C.-W. Phan
© 2007 Pearson Education, Inc.
Pearson Prentice Hall
Upper Saddle River, NJ 07458
FIGURE 4–11 Turnstile problem
The 8051 Microcontroller, 4e
By I. Scott MacKenzie and Raphael C.-W. Phan
© 2007 Pearson Education, Inc.
Pearson Prentice Hall
Upper Saddle River, NJ 07458
FIGURE 4–12 Loudspeaker interface
The 8051 Microcontroller, 4e
By I. Scott MacKenzie and Raphael C.-W. Phan
© 2007 Pearson Education, Inc.
Pearson Prentice Hall
Upper Saddle River, NJ 07458
FIGURE 4–13 60 Hz time base