Presentation is loading. Please wait.

Presentation is loading. Please wait.

Timers Chapter 10. Timers The 68HC12 Programmable Timer Output Compares Input Capture Pulse Accumulator Timing Interrupt Service Routines A Circular Queue.

Similar presentations


Presentation on theme: "Timers Chapter 10. Timers The 68HC12 Programmable Timer Output Compares Input Capture Pulse Accumulator Timing Interrupt Service Routines A Circular Queue."— Presentation transcript:

1 Timers Chapter 10

2 Timers The 68HC12 Programmable Timer Output Compares Input Capture Pulse Accumulator Timing Interrupt Service Routines A Circular Queue Data Structure Keypad Interfacing Using Interrupts

3 Timers (cont.) Pulse Train Using Interrupts Measuring the Period of a Pulse Train Using Interrupts The Polaroid Ultrasonic Transducer –An Ultrasonic Tape Measure

4

5 Timer Counter

6 Timer System Control Register

7 Setting the timer count time

8

9

10 68HC11 Timer Registers

11

12

13 Timers The 68HC12 Programmable Timer Output Compares Input Capture Pulse Accumulator Timing Interrupt Service Routines A Circular Queue Data Structure Keypad Interfacing Using Interrupts

14

15

16

17 Pulse Train Example

18

19

20

21

22 Timers The 68HC12 Programmable Timer Output Compares Input Capture Pulse Accumulator Timing Interrupt Service Routines A Circular Queue Data Structure Keypad Interfacing Using Interrupts

23 Input Capture

24

25

26

27 Timers The 68HC12 Programmable Timer Output Compares Input Capture Pulse Accumulator Timing Interrupt Service Routines A Circular Queue Data Structure Keypad Interfacing Using Interrupts

28 Pulse Accumulator

29

30

31 The 74C922 16-Key Encoder Connect pin 12 to PT7/PAI instead of PJ7

32

33 Pulse Accumulator on a 68HC11

34

35

36 Timers The 68HC12 Programmable Timer Output Compares Input Capture Pulse Accumulator Timing Interrupt Service Routines A Circular Queue Data Structure Keypad Interfacing Using Interrupts

37 Timing Interrupt Service Routines Traffic Lights Using Real-time Interrupt

38 Copy TRAFFIC.WHP to TRAFFIC2.WHP

39 Load TRAFFIC2.WHP TEST.SETUP TEST Add:

40 Timers The 68HC12 Programmable Timer Output Compares Input Capture Pulse Accumulator Timing Interrupt Service Routines A Circular Queue Data Structure Keypad Interfacing Using Interrupts

41 A Circular Queue empty Containing 2 values

42

43

44

45 Timers The 68HC12 Programmable Timer Output Compares Input Capture Pulse Accumulator Timing Interrupt Service Routines A Circular Queue Data Structure Keypad Interfacing Using Interrupts

46

47

48 Timers (cont.) Pulse Train Using Interrupts Measuring the Period of a Pulse Train Using Interrupts The Polaroid Ultrasonic Transducer –An Ultrasonic Tape Measure

49 Pulse Train

50

51

52

53 Timers (cont.) Pulse Train Using Interrupts Measuring the Period of a Pulse Train Using Interrupts The Polaroid Ultrasonic Transducer –An Ultrasonic Tape Measure

54

55

56 Timers (cont.) Pulse Train Using Interrupts Measuring the Period of a Pulse Train Using Interrupts The Polaroid Ultrasonic Transducer –An Ultrasonic Tape Measure

57 Polaroid Ultrasonic Ranging System

58 Waveforms of Ultrasonic Ranging System

59

60

61

62 Exercises

63

64

65

66

67

68

69

70


Download ppt "Timers Chapter 10. Timers The 68HC12 Programmable Timer Output Compares Input Capture Pulse Accumulator Timing Interrupt Service Routines A Circular Queue."

Similar presentations


Ads by Google