FIGURE 4–1 A 3-bit timer. (a) Schematic. (b) Timing...

13
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.

Transcript of FIGURE 4–1 A 3-bit timer. (a) Schematic. (b) Timing...

Page 1: FIGURE 4–1 A 3-bit timer. (a) Schematic. (b) Timing diagram.epsem.upc.edu/~jesusv/uc8051_web/ppt_mackenzie/0130603864_pp0… · Pearson Prentice Hall Upper Saddle River, ... (d)

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.

Page 2: FIGURE 4–1 A 3-bit timer. (a) Schematic. (b) Timing diagram.epsem.upc.edu/~jesusv/uc8051_web/ppt_mackenzie/0130603864_pp0… · Pearson Prentice Hall Upper Saddle River, ... (d)

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

Page 3: FIGURE 4–1 A 3-bit timer. (a) Schematic. (b) Timing diagram.epsem.upc.edu/~jesusv/uc8051_web/ppt_mackenzie/0130603864_pp0… · Pearson Prentice Hall Upper Saddle River, ... (d)

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

Page 4: FIGURE 4–1 A 3-bit timer. (a) Schematic. (b) Timing diagram.epsem.upc.edu/~jesusv/uc8051_web/ppt_mackenzie/0130603864_pp0… · Pearson Prentice Hall Upper Saddle River, ... (d)

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

Page 5: FIGURE 4–1 A 3-bit timer. (a) Schematic. (b) Timing diagram.epsem.upc.edu/~jesusv/uc8051_web/ppt_mackenzie/0130603864_pp0… · Pearson Prentice Hall Upper Saddle River, ... (d)

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

Page 6: FIGURE 4–1 A 3-bit timer. (a) Schematic. (b) Timing diagram.epsem.upc.edu/~jesusv/uc8051_web/ppt_mackenzie/0130603864_pp0… · Pearson Prentice Hall Upper Saddle River, ... (d)

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

Page 7: FIGURE 4–1 A 3-bit timer. (a) Schematic. (b) Timing diagram.epsem.upc.edu/~jesusv/uc8051_web/ppt_mackenzie/0130603864_pp0… · Pearson Prentice Hall Upper Saddle River, ... (d)

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

Page 8: FIGURE 4–1 A 3-bit timer. (a) Schematic. (b) Timing diagram.epsem.upc.edu/~jesusv/uc8051_web/ppt_mackenzie/0130603864_pp0… · Pearson Prentice Hall Upper Saddle River, ... (d)

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

Page 9: FIGURE 4–1 A 3-bit timer. (a) Schematic. (b) Timing diagram.epsem.upc.edu/~jesusv/uc8051_web/ppt_mackenzie/0130603864_pp0… · Pearson Prentice Hall Upper Saddle River, ... (d)

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

Page 10: FIGURE 4–1 A 3-bit timer. (a) Schematic. (b) Timing diagram.epsem.upc.edu/~jesusv/uc8051_web/ppt_mackenzie/0130603864_pp0… · Pearson Prentice Hall Upper Saddle River, ... (d)

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

Page 11: FIGURE 4–1 A 3-bit timer. (a) Schematic. (b) Timing diagram.epsem.upc.edu/~jesusv/uc8051_web/ppt_mackenzie/0130603864_pp0… · Pearson Prentice Hall Upper Saddle River, ... (d)

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

Page 12: FIGURE 4–1 A 3-bit timer. (a) Schematic. (b) Timing diagram.epsem.upc.edu/~jesusv/uc8051_web/ppt_mackenzie/0130603864_pp0… · Pearson Prentice Hall Upper Saddle River, ... (d)

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

Page 13: FIGURE 4–1 A 3-bit timer. (a) Schematic. (b) Timing diagram.epsem.upc.edu/~jesusv/uc8051_web/ppt_mackenzie/0130603864_pp0… · Pearson Prentice Hall Upper Saddle River, ... (d)

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