lecNew-11-TimerEx

lecNew-11-TimerEx - WPI ECE2801 Foundations of Embedded...

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

View Full Document Right Arrow Icon
WPI ECE2801 Foundations of Embedded Computer Systems Lecture 11: Timer_B Example
Background image of page 1

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

View Full DocumentRight Arrow Icon
EE2801: Foundations of Embedded Systems Lecture 11 Review: Timers Timers count clock ticks Can operate in a number of common modes Up (or Down) mode Continuous Mode Up/Down mode Timers can be polled (count register) or generate interrupts Four timers: Watchdog timer: for error recovery Basic Timer 1: two 8-bit timers, low frequency timers Timer_A, Timer_B: 16-bit, multiple capture/compare blocks, extensive interrupt capabilities
Background image of page 2
Timer_B 16-bit, but programmable to be 8, 10, 12, or 16 bits With multiple capture/compare registers 4 modes – stop, up, continuous, up/down Interruptable (2 interrupt vectors) Registers TBCTL : Timer_B control register, counter length (CNTL), clock source (TBSSEL), input divider (ID), mode (MC), interrupt enable (TBIE), interrupt flag (TBIFG) TBR : Timer_B register, holds the count TBCCTL0 : capture/compare 0 control register, capture/compare (CAP,CM), interrupt enable (CCIE), interrupt flag (CCIFG) TBCCR0 : capture/compare 0 register, holds the value for the comparison to the timer value EE2801: Foundations of Embedded Systems Lecture 11
Background image of page 3

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

View Full DocumentRight Arrow Icon
EE2801: Foundations of Embedded Systems Lecture 11 An Example:
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/12/2009 for the course ECE 2801 taught by Professor Jarvis during the Spring '08 term at WPI.

Page1 / 14

lecNew-11-TimerEx - WPI ECE2801 Foundations of Embedded...

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

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