National Tsing Hua University CS4101 Introduction to Embedded Systems Lab 3: Interrupt Prof. Chung-Ta King Department of Computer Science National Tsing.

Slides:



Advertisements
Similar presentations
UBI >> Contents Chapter 7 Timers Laboratories MSP430 Teaching Materials Texas Instruments Incorporated University of Beira Interior (PT) Pedro Dinis Gaspar,
Advertisements

1 ELE271 Mon. April 7, Review LPM -Morse Code Lab -.ref and.def -Multiplication, shift.
Chung-Ta King National Tsing Hua University
Chung-Ta King National Tsing Hua University
Chung-Ta King National Tsing Hua University
Notes on the ez430-RF2500. Sources
Decoding Barcodes Various approaches. Decoding barcodes There are a number of ways of decoding the barcodes –The data can be polled –The data can be read.
Science,Technology and Society Spring 2006 Educ 4234.
CS4101 嵌入式系統概論 Timers and Clocks 金仲達教授 國立清華大學資訊工程學系 Materials from MSP430 Microcontroller Basics, John H. Davies, Newnes, 2008.
CS4101 嵌入式系統概論 Software UART Revisited Prof. Chung-Ta King Department of Computer Science National Tsing Hua University, Taiwan ( Materials from MSP430.
Chung-Ta King National Tsing Hua University
LAB 7: WDT+ and Low-Power Optimization
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.
MSP430 Mixed Signal Microcontroller – Parte 2 Afonso Ferreira Miguel Source: slau056d – Texas instruments.
Lab 1 Department of Computer Science and Information Engineering National Taiwan University Lab1 - Sensor 2014/9/23/ 13 1.
LAB 8: Program Design Pattern and Software Architecture
Real-Time Embedded Operating System for a SoC System Hsung-Pin Chang Department of Computer Science National Chung Hsing University.
LAB 12: Timer and Interrupt Chung-Ta King National Tsing Hua University CS 4101 Introduction to Embedded Systems.
Microcontroller Programming
Network and Systems Laboratory nslab.ee.ntu.edu.tw.
67015 ACLK (32.768kHz) Timer count (ex. TA0R) Interrupt Note: Timer Settings : Upmode / CCR0=7 / CCR1 =7/ CCR2=1 Interrupts Enabled: CCR1/CCR2/overflow.
11/16/2006 WSN Mote- MCU & Sensor Hardware 1 ECET 581 Wireless Sensor Networks Mote – MCU & Sensor Hardware 1 of 3 Fall 2006
Example of RTMES Lab. 1 Controls Kukhee Kim June 24, 2010 Example of RTEMS Lab. Controls Department June 24, 2010 Kukhee Kim.
Introduction to the DE0 Board Prof. Taeweon Suh Computer Science & Engineering Korea University COSE221, COMP211 Computer Logic Design.
Introduction In this lab , we will learn
MQX GPIO.
Recall the Container Thermometer
Outline Installing Gem5 SPEC2006 for Gem5 Configuring Gem5.
Outline Introduction to NuMaker TRIO Programming environment setup
Lab 7 Basic 1: Game of Memory
Introduction In this lab , we will learn
Introduction In this lab, we will learn
Outline Introduction to digital-to-analog converter (DAC)
Introduction Why low power?
Introduction Why low power?
Outline Introduction Centralized shared-memory architectures (Sec. 5.2) Distributed shared-memory and directory-based coherence (Sec. 5.4) Synchronization:
CS4101 嵌入式系統概論 General Purpose IO
Outline Analog to digital conversion (ADC) of NuMaker TRIO
CS4101 Introduction to Embedded Systems Lab 10: Tasks and Scheduling
CS4101 Introduction to Embedded Systems Lab 8: Tower System
CS4101 嵌入式系統概論 Interrupts Prof. Chung-Ta King
Code review: GPIO, timer, and ISR
CS4101 Introduction to Embedded Systems Lab 11: Task Synchronization
CS4101 Introduction to Embedded Systems Lab 6: Low-Power Optimization
GUI Programming using Java - Key Events
CS4101 Introduction to Embedded Systems Lab 1: MSP430 LaunchPad IDE
CS4101 Introduction to Embedded Systems Lab 12: Task Synchronization
CS4101 Introduction to Embedded Systems Lab 11: Sensors
CS4101 Introduction to Embedded Systems Lab 1: General Purpose IO
CS4101 Introduction to Embedded Systems Lab 13: Task Synchronization
Instructor : Ahmed Alalawi Slides from Chung –Ta King
Prof. Chung-Ta King Department of Computer Science
COMP211 Computer Logic Design Introduction to the DE2 Board
CS4101 Introduction to Embedded Systems Lab 9: NuMaker ADC and LCD
CS4101 嵌入式系統概論 General Purpose IO
CS4101 Introduction to Embedded Systems Design and Implementation
National Tsing Hua University CS4101 Introduction to Embedded Systems Lab 2: Timer and Clock Prof. Chung-Ta King Department of Computer Science National.
National Tsing Hua University CS4101 Introduction to Embedded Systems Lab 6: Serial Communication Prof. Chung-Ta King Department of Computer Science National.
CS4101 Introduction to Embedded Systems Lab 4: Interrupt
8051 Timers / Counters It has two timers Timer 0 and Timer 1.
CS4101 Introduction to Embedded Systems Lab 8: Arduino DAC and PWM
Microcontroller Labs Lab 1 – The LED Test Mode Dr. Gregg Chapman
Department of Computer Science & Engineering, HITEC University, Taxila
Wireless Embedded Systems
Lab 1. Introduction to the DE2 Board
CS4101 Introduction to Embedded Systems Lab 2: Basic IO and Timer
Lecture 4. Introduction to the DE2 Board
Prof. Chung-Ta King Department of Computer Science
MSP430 Clock System and Timer
ECE 3567 Microcontrollers Lab
Presentation transcript:

National Tsing Hua University CS4101 Introduction to Embedded Systems Lab 3: Interrupt Prof. Chung-Ta King Department of Computer Science National Tsing Hua University, Taiwan

National Tsing Hua University Lab 3 Basic 1:  Flash the red and green LED alternatively on interrupt from the button, whenever the button is pressed and released once. The LEDs change right after the button is released. The LEDs flash at 1 Hz (0.3 sec on and 0.7 sec off) by interrupt from Timer0_A3, which is driven by ACLK sourced from VLO (running at 12 KHz).  Note: There are two interrupts to handle: timer up and button down and up.  Note: Since TAR register is 16-bit (0~65535) long, you should be careful of its overflow. 1

National Tsing Hua University Lab 3 Basic 2:  When the button is up, neither of the LEDs is on.  When the button is down, only flash the green LED according to the settings in Basic 1. The event, “button down”, must be detected by interrupts.  Furthermore, if the button is pressed for more than 3 seconds, flash only the red LED instead (on for 0.2 sec and off for 0.8 sec), which is controlled by interrupts from Timer1_A3 driven by SMCLK sourced by DCO. The event, “more than 3 seconds”, should be implemented by interrupts. 2