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.

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)
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.
EET 2261 Unit 10 Enhanced Capture Timer  Read Almy, Chapter 20.  Homework #10 and Lab #10 due next week.  Quiz next week.
Timers in Hardware ECE152. Overview Why are timers important – Watchdog – Task switching – Accurate time of day Can use polling or interrupts.
Timers Chapter 10. Timers The 68HC12 Programmable Timer Output Compares Input Capture Pulse Accumulator Timing Interrupt Service Routines A Circular Queue.
8-Bit Timer/Counter 0 Counter/Timer 0 and 2 (TCNT0, TCNT2) are nearly identical. Differences: -TCNT0 can run off an external 32Khz clock (Tosc) or the.
ATtiny2313 Timers/Counters CS-423 Dick Steflik. What Do You Use Timers For? Timing of events (internal or external)‏ Scheduling Events Measuring the width.
5-1 Timer/Counters In many microprocessor systems we need to:  count logic pulses  measure the frequency of signals  measure the period of pulses 
Timers and Interrupts Shivendu Bhushan Summer Camp ‘13.
1 ECE 263 Embedded System Design Lessons 2, 3 68HC12 Hardware Overview, Subsystems, and memory System.
Timers ME4447 INTRODUCTION TO MECHATRONICS Anthony Wingo Carlos Alzate Jim Kitchen.
Lecture 13: TI MSP430 Watchdog Timer and Real-Time Clock
ECE 265 – LECTURE 12 The Hardware Interface 8/22/ ECE265.
1 Timing System Timing System Applications. 2 Timing System components Counting mechanisms Input capture mechanisms Output capture mechanisms.
ENG3640 Microcomputer Interfacing Week #6 Timing Generation and Measurement.
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.
System Clocks.
Timers ELEC 330 Digital Systems Engineering Dr. Ron Hayne
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.
Revised: Aug 1, ECE 263 Embedded System Design Lessons 23, 24 - Exceptions - Resets and Interrupts.
ECE 447 Fall 2009 Lecture 10: TI MSP430 Timers and Capture Modes.
Internal Input/Output Devices (I/O Subsystems)
Lecture 11: TI MSP430 Timers Compare Modes
Timers.
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose This course provides an introduction to the peripheral functions.
Chapter 11: Timer Subsystem Esteban Rodriguez-Marek Eastern Washington University Department of Engineering & Design.
ELE22MIC Lecture 15 Applications of Parallel Input Output (I/O)
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)
Timers and Interrupts Anurag Dwivedi. Let Us Revise.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose This course provides an overview of the standard peripheral.
George W. Woodruff School of Mechanical Engineering, Georgia Tech ME4447/6405 ME 4447/6405 Microprocessor Control of Manufacturing Systems and Introduction.
CS-280 Dr. Mark L. Hornick 1 Atmel Timer/Counter System Most microcontrollers include some type of timer system Facilitates real-time monitoring and control.
1 Interrupts, Resets Today: First Hour: Interrupts –Section 5.2 of Huang’s Textbook –In-class Activity #1 Second Hour: More Interrupts Section 5.2 of Huang’s.
1 68HC11 Timer HC11 or HC12: Chapter HC11 Timer Subsystem  Several timing functions: Basic timing Basic timing Real time interrupts Real time.
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose This course provides an introduction to the peripheral functions.
TIMERS AND INTERRUPTS AVI SINGH KEVIN JOSE PIYUSH AWASTHI.
#1 of 10 Tutorial Introduction PURPOSE -To explain how to configure and use the Timer Interface Module in common applications OBJECTIVES: -Identify the.
PULSE WIDITH MODULATION EE 587 Presented by Viswanadha Kakarlapudi.
Timer 1 and 2 operation, PWM Principles. Timer 1 Operation.
1 68HC11 Timer. 2 68HC11 Timer Subsystem Several timing functions: Basic timing Basic timing Real time interrupts Real time interrupts Output compare.
Timers Presented by: Griffin Reid Rohit Vardhan Freddie Wilson Date: October 25, 2005.
Seth Schwiethale James Crosetto James Ellison.  square pulse of ms, repeats every 20 ms  It is the same for both steering and acceleration 
EET 2261 Unit 13 Enhanced Capture Timer
Why are Timer Functions Important?
Lecture 10: TI MSP430 Timers and Capture Modes
V.V.P. ENGINEERING COLLEGE,RAJKOT
ECE 3430 – Intro to Microcomputer Systems
ECE 3430 – Intro to Microcomputer Systems
68HC11 Interrupts & Resets.
Programmable Interval Timer 8254 LECTURE 3
AVR Addressing Modes Subject: Microcontoller & Interfacing
MSP432 ARM Timer Programming
ECE 3430 – Intro to Microcomputer Systems
Timers.
Lecture 12 Multi-Function Timer Pulse Unit 2 (MTU2a)
Timer Source: under
Programmable Logic Controllers (PLCs)
MCO556 Timer System Exercise.
Timer/Counter Timer/Counter 0 Timer/Counter 1 Timer/Counter 2 8 bit
Programmable Interval Timer
Presentation transcript:

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 polling. label 1 label2 instr1 instr2 instrN delay 2. Pulse accumulation - counting the number of pulses

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

ECE 447: 68HC11 Timer System 5. Real Time Interrupt – Produce a period signal for the 68HC11. period The Real Time Interrupt will allow a piece of code to be executed at a given period. This can be used to implement a Real-Time clock.

ECE447: Timer I/O Pins PA0 - Input Capture 3 (IC3) PA1 -Input Capture 2 (IC2) PA2 - Input Capture 1 (IC1) PA3 - Input Capture 4/ Output compare 5 (IC4/OC5) PA4 - Output Compare 4 (OC4) PA5 - Output Compare 3 (OC3) PA6 - Output Compare 2 (OC2) PA7 - Pulse Accumulator Input (PAI)

ECE 447: Setting and Clearing Event Flags Example for Input Capture 1 Unusual procedure!!! Set a flagClear a flag #define IC1F 0x04 TFLG1 = IC1F; Cannot be done in software!!! Set by a preselected edge at the PA2 input Cleared by writing 1 to the corresponding bit location!!!

ECE447: Measuring Pulse Widths Timer overflows 100  s < width < ms width  100  s width  ms 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