ECE 447 Fall 2009 Lecture 10: TI MSP430 Timers and Capture Modes.

Slides:



Advertisements
Similar presentations
ECE/CS-352: Embedded Microcontroller Systems The Silicon Laboratories C8051F020 Enhanced 8051 Part 5 Other Subsystems.
Advertisements

Interrupts, Low Power Modes and Timer A (Chapters 6 & 8)
Chung-Ta King National Tsing Hua University
More fun with Timer/Counters
4-1 Timers Timers can be used for  timing  event counting  pulse width measurement  pulse generation  frequency multiplication There are 8 Timers.
Sistemi Elettronici Programmabili13-1 MULTI OSC + CLOCK FILTER LVD POWER SUPPLY CONTROL 8 BIT CORE ALU PROGRAM MEMORY RAM I2CI2C PORT A SPI PORT B 16-BIT.
Kuliah Mikrokontroler AVR Comparator AVR Eru©September 2009 PENS.
Timers in Hardware ECE152. Overview Why are timers important – Watchdog – Task switching – Accurate time of day Can use polling or interrupts.
8254 Modes Made by: Ryan wahab (8) Modes Gate is low the count will be paused Gate is high Will continue counting Mode 0: An events counter.
Chung-Ta King National Tsing Hua University
Timers. Range of timers Watchdog timer: Included in all devices (watchdog timer+). Its main function is to protect the system against malfunctions but.
ECE 265 – LECTURE 12 The Hardware Interface 8/22/ ECE265.
T IMERS - 2. O UTPUT U NIT Each capture/compare block contains an output unit. The output unit is used to generate output signals such as PWM signals.
1 Timing System Timing System Applications. 2 Timing System components Counting mechanisms Input capture mechanisms Output capture mechanisms.
8254 Programmable Interval Timer
ECE 371- Unit 11 Timers and Counters (“Stop Watches and Alarm Clocks”)
7/23 Timers in Coldfire Processor Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee (480)
ARM Timers.
Timers ELEC 330 Digital Systems Engineering Dr. Ron Hayne
MSP430 Mixed Signal Microcontroller – Parte 2 Afonso Ferreira Miguel Source: slau056d – Texas instruments.
Unit 10.2 Timer Examples. Example – Music Generation Channel 6 – Set up as a timer Output to Generate Square Waves Channel 4 – Set up as a timer Output.
CPE 323 Introduction to Embedded Computer Systems: Watchdog Timer, Timer A Instructor: Dr Aleksandar Milenkovic Lecture Notes.
Timer Peripherals.
AT91 Embedded Peripherals
Internal Input/Output Devices (I/O Subsystems)
Lecture 11: TI MSP430 Timers Compare Modes
Timers.
ECE 447: Lecture 8 Timer System (1). ECE 447: 68HC11 Timer System 1.Generating delays - imposing a specific delay between two points in the program by.
George W. Woodruff School of Mechanical Engineering, Georgia Tech ME4447/6405 ME 4447/6405 Microprocessor Control of Manufacturing Systems and Introduction.
Timer Timer is a device, which counts the input at regular interval (δT) using clock pulses at its input. The counts increment on each pulse and store.
1 68HC11 Timer Chapter HC11 Timer Subsystem Several timing functions: Basic timing Basic timing Real time interrupts Real time interrupts Output.
Lecture 12 Multi-Function Timer Pulse Unit 2 (MTU2a)
ECE 447 Fall 2009 Lecture 7: MSP430 Polling and Interrupts.
1 68HC11 Timer HC11 or HC12: Chapter HC11 Timer Subsystem  Several timing functions: Basic timing Basic timing Real time interrupts Real time.
Network and Systems Laboratory nslab.ee.ntu.edu.tw.
#1 of 10 Tutorial Introduction PURPOSE -To explain how to configure and use the Timer Interface Module in common applications OBJECTIVES: -Identify the.
Timer 1 and 2 operation, PWM Principles. Timer 1 Operation.
Timers Presented by: Griffin Reid Rohit Vardhan Freddie Wilson Date: October 25, 2005.
Timer Programming in Assembly and C Prepared By:
Recall the Container Thermometer
Why are Timer Functions Important?
Lecture 10: TI MSP430 Timers and Capture Modes
ECE 3430 – Intro to Microcomputer Systems
Lecture 8: TI MSP430 Interrupts, ISRs
CS4101 嵌入式系統概論 Interrupts Prof. Chung-Ta King
PWM and DC Motor Control
EMBEDDED SYSTEMS Unit 3.
Timer and Interrupts.
ECE 3430 – Intro to Microcomputer Systems
Programmable Interval Timer
Programmable Interval Timer
Programmable Interval Timer 8254 LECTURE 3
MSP432 ARM Timer Programming
BVM Engineering College Electrical Engineering Department : Microprocessor and Microcontroller Interfacing Interrupts of 8051 Prepared by:
National Tsing Hua University CS4101 Introduction to Embedded Systems Lab 2: Timer and Clock Prof. Chung-Ta King Department of Computer Science National.
ECE 3430 – Intro to Microcomputer Systems
ECE 3430 – Intro to Microcomputer Systems
CS4101 Introduction to Embedded Systems Lab 4: Interrupt
ECE 3430 – Intro to Microcomputer Systems
Timers.
MSP432 ARM Timer Programming
Lecture 12 Multi-Function Timer Pulse Unit 2 (MTU2a)
Timer Source: under
ECE 3430 – Intro to Microcomputer Systems
ECE 3430 – Intro to Microcomputer Systems
CS4101 Introduction to Embedded Systems Lab 2: Basic IO and Timer
MSP430 Clock System and Timer
Programmable Interval Timer
Presentation transcript:

ECE 447 Fall 2009 Lecture 10: TI MSP430 Timers and Capture Modes

Timer_A Overview Timer Block –The core, based on 16-bit register TAR –Can chose sources for clock and freq division –Timer block has no output –Flag TAIFG is raised when counter returns to 0 Capture/compare channels –Capture an input, record value in TAR triggered by TACCRn –Compare TAR with the value stored in TACCRn –Request an Interrupt by setting its flag TACCRn CCFIG –Sample an input at a compare event

ECE 447: MSP430 Timer_A System 1.Generating delays - imposing a specific delay between two points in the program by polling. label 1 label2 instr1 instr2 instrN delay

ECE 447: MSP430 Timer_A System 2. Input capture - measuring the time between signal edges 3. Output compare - generating signals with the given timing characteristics start stop startstop pulse width single pulseperiodical signal period

ECE 447: MSP430 Timer_A System 4. Real Time Clock– Produce a periodic signal for the MSP430. period The Real Time Clock Interrupt implements a hardware based time of day clock that can be used by the software.

ECE447: MSP430 Timer I/O Pins and Channels

ECE447: MSP430 Compare/Capture Block Diagram.

MSP430xx4xx Implementation of Timer_A

Timer_A Interrupt Schematic

Timer_A MSP430xx4xx Registers

TACTL: Timer_A Control Register

TAR: Timer_A Register

TACCRx: Timer_A Capture/Compare Register

TACCTLx: Capture/Compare Control Register

TAIV: Timer_A Interrupt Vector Register

ECE447: MPS430 Timer_A input clocks and dividers

ECE447: Measuring Pulse Widths Timer overflows 100  s < width < Configured Period (previous table) width  100  s width  Configured Period (previous table) start stop start stop start stop

ECE 447: Measuring intervals <2 16 clock cycles start 0 FFFF stop

ECE 447: Measuring intervals <2 16 clock cycles (overflow) start 0 FFFF 12 stop

ECE 447: Measuring intervals >2 16 clock cycles start stop 0 FFFF 12 N=3 R

ECE 447: Measuring intervals >2 16 clock cycles start stop 0 FFFF 12 3 R2 R1 N=4 R1+R2=R