Lec12Timer

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

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

View Full Document Right Arrow Icon
ECE 471 12-Timer-1 Lecture 12. Timer Configuration Outline Timer applications Input capture Output compare
Background image of page 1

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

View Full DocumentRight Arrow Icon
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
Background 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.
Background image of page 3

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

View Full DocumentRight Arrow Icon
ECE 471 12-Timer-4 Pulse Accumulator Circuit
Background 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)
Background image of page 5

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

View Full DocumentRight Arrow Icon
ECE 471 12-Timer-6 How to select the source of accumulator clock?
Background 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
Background image of page 7

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

View Full DocumentRight Arrow Icon
ECE 471 12-Timer-8 16-Bit Pulse Accumulator Count Register Full count register access should take place in one clock cycle.
Background image of page 8
ECE 471 12-Timer-9 Application 2: Input capture Determine the number of occurrence of input signal Determine the length of input signal Application Example Find the frequency of an input signal
Background image of page 9

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

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 31

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

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online