Lec12Timer - Timer Applications Timer is a hardware circuit...

Info icon This preview shows pages 1–10. Sign up to view the full content.

ECE 471 12-Timer-1 Lecture 12. Timer Configuration Outline Timer applications Input capture Output compare
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

ECE 471 12-Timer-2 Timer Applications Timer is a hardware circuit designed for Measuring the length of input waveform Counting the number of external input events Generating output waveform Real-time interrupt A timer can be configured either as input capture or output compare generate interrupts once a given task is completed. 68HC12 standard module has Eight 16-bit timers One accumulator
Image of page 2
ECE 471 12-Timer-3 Application 1 - Pulse Accumulator Pulse Accumulator can be used as External event counter counts number of pulses from pins Timer Counts number of pulses from system clock When the accumulator turns from $FFFF to $0, an overflow flag is set. If interrupt is enabled and overflow flag is set, an interrupts will be generated.
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

ECE 471 12-Timer-4 Pulse Accumulator Circuit
Image of page 4
ECE 471 12-Timer-5 Pulse Accumulator Control Register (PACTL) PAEN — Pulse Accumulator System Enable Bit PAEN is independent from TEN. PAMOD — Pulse Accumulator Mode Bit (event counter or timer) PEDGE — Pulse Accumulator Edge Control Bit CLK1 and CLK0 — Clock Select Bits PAOVI — Pulse Accumulator Overflow Interrupt Enable Bit PAI — Pulse Accumulator Input Interrupt Enable Bit (enable interrupt for every external event)
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

ECE 471 12-Timer-6 How to select the source of accumulator clock?
Image of page 6
ECE 471 12-Timer-7 Pulse Accumulator Flag Register PAOVF — Pulse Accumulator Overflow Flag PAIF — Pulse Accumulator Input Edge Flag Event counter interrupt vector is $FFDC Timer interrupt vector is $FFDA
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

ECE 471 12-Timer-8 16-Bit Pulse Accumulator Count Register Full count register access should take place in one clock cycle.
Image of page 8
ECE 471 12-Timer-9 Application 2: Input capture Determine the number of occurrence of input signal
Image of page 9

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Image of page 10
This is the end of the preview. Sign up to access the rest of the document.
  • Spring '08
  • Chien
  • Interrupt, Status register, Interrupt handler, Duty Cycle.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern