Reading: Davies , 8.3-4, , MSP430x55xx User's Guide Ch. 5,17

Size: px
Start display at page:

Download "Reading: Davies , 8.3-4, , MSP430x55xx User's Guide Ch. 5,17"

Transcription

1 ECE2049 Homework #3 Clocks & Timers (Due Tuesday 9/19/17 At the BEGINNING of class) Your homework should be neat and professional looking. You will loose points if your HW is not properly submitted (by properly I mean stapled with a cover sheet including your ECE box number). Any code should be typed! Reading: Davies , 8.3-4, , MSP430x55xx User's Guide Ch. 5,17 Problem 1 (20 pts) a) Check the MSP430F559 Launchpad Schematic. What are the exact frequencies of the crystals XT1 and XT2 on our lab board? b) To what frequencies are ACLK, MCLK and SMCLK set by default by Code Composer Studio? What are the range of possible clock frequencies for MCLK and SMCK? What is each clock (ACLK, MCLK and SMCLK) primarily used for? c) The following line is executed at the beginning of configdisplay() during system initialization by our demo project code. We are working with the clock system not digital IO. Why is it necessary? What does it do? Why do you think none of the buttons, or LEDs or the keypad, or scroll wheel, etc., use any port 5 pins? P5SEL = (BIT5 BIT4 BIT3 BIT2); d) Below are the values of the Unified Clock System registers for two different MSP430 applications. Use the MSP430x55xx User's Guide Chapter 5 and class notes to decode the bit fields for each register. What are the resulting values of ACLK, MCLK, and SMCLK in each case. (Hint: see Users Guide page 164 for f DCOCLK equations) UCSCTL0 = 0x12A8 UCSCTL1 = 0x0040 UCSCTL2 = 0x1004 UCSCTL3 = 0x0050 UCSCTL4 = 0x0044 UCSCTL5 = 0x0010 UCSCTL6 = 0xC0CC UCSCTL7 = 0x0403 UCSCTL8 = 0x0707 e) Write a C function (see prototype below) that expressly turns on both XT1 and XT2 (see UCSCTL6) and sets the frequency of MCLK and SMCLK either 1.8 MHz or 18MHz (or as close as you can get) depending on the value of the input argument. Explain whether you used XT1 or XT2 as source for DCO REFCLK for each frequency and why. Assume all other clock settings are to be left in their default state. You may still assume that P5.5-2 are set as shown in (c) at the top of configdisplay() and that they do not have to be configured by your function. Your code must be typed to be graded. void clks_1x_10x(unsigned char speed_option);

2 Problem 2 Time standards are very important to the scientific, engineering and computing communities. However, precisely keeping track of time all over the world is a deceptively tricky business. Watch this video and do a bit of Googling and tell me the following. (30 pts) a) What is Coordinated Universal Time (UTC)? What is the time zone for Colombo, Sri Lanka in terms of UTC, (e.g. Minsk, Belarus is UTC + 2:00)? In the scientific community, times are often written something like 19:00Z, read as 19 hundred Zulu. What is Zulu time? In computing, UTC based time scales usually store the current time as the number of seconds that have elapsed since the beginning of some epoch. Usually the number of elapsed seconds are stored in a 32-bit unsigned integer. b) What is the start date of the Network Time Protocol (NTP) epoch? If 0 seconds corresponds to midnight (i.e. 00:00:00) on the first day of the NPT epoch, how many full years plus days, hours, minutes and seconds can be stored in a 32-bit unsigned integer? In many systems it is more practical to just consider the seconds in the current year. The time format is modified such that a count of 0 seconds corresponds to midnight January 1 of the current year with a second variable holding the year. c) If a UTC-style clock counting whole seconds was initialized to 0 at midnight 1 Jan 2017 currently has a count of 19,400,000 seconds what day (i.e. date) and time is it? Like April 3, 8:43:02 am. Hint: Remember that days are counted from 1. d) An autonomous data logger device is to be placed on the ocean floor for 6 months during which it will automatically take various oceanographic measurements. It must be able to measure the time elapsed since deployment to within 5 millisecond throughout its operational life. The engineers have designed the device to record for a maximum of 200 days in case there were to be a delay in device retrieval. Can the engineers use a 32-bit unsigned integer to store time to within 5 ms inside this data recorder? Or, must they use a 64-bit variable? Explain your answer. e) How would you configure TimerA2 to implement a clock with 5 ms resolution assuming SMCLK has already been configured to equal 4 MHz? Write a C code segment (including the TimerA2 setup and TimerA2 ISR) implementing a clock that saves its time (count) to a variable of the appropriate size (as determined in part d). You do not have to configure the UCS registers to set the value of SMCLK. Your timer should generate interrupts only once per millisecond. Do you need leap counting? Explain. f) Create a C function that converts the timer count from parts d & e to recorder mission day, hours, minutes and sec.sss. The count of days should starts at 1 not 0 (e.g. Mission Day 1 00:00: is midnight on the first deployed day). Your code must be typed to be graded. You do not have to convert your results to ascii for display.

3 Problem 3 For a certain application TimerA2 has been configured as shown below. a) What is the exact time between interrupts. Assume that ACLK, SMCLK and MCLK are running at their default settings. (20 pts) void runtimera2(void) { TA2CTL = TASSEL_2 MC_1 ID_3; TA2CCR0 = 1310; TA2CCTL0 = CCIE; // enable Timer A2 interrupt } b) If the system clock and TimerA2 settings from part (a) are used implement a timing system, how long until the time displayed by that system is off by seconds? By 0.01 seconds? Will the system be fast or slow? How do you know? c) Write the interrupt service routine for TimerA2 for this application. Include a single level of leap counting to keep the display accurate for longer. How long until you leap counting system is off my sec. Your code must be typed to be graded. d) Assume the MSP430 clocks have been configured to the following frequencies. ACLK = 32,768 Hz MCLK = 2.0 MHz SMCLK = XT2 = 4.0 MHz What is the smallest time interval you could theoretically measure using TimerA2 assuming these settings for MCLK, SMCLK and ACLK? Could your MSP430 system actually function with the Timer set to that interval? Explain why or why not.

4 Problem 4 A new style of automated gas pump (controlled by an MSP430F5529) dispenses product a constant, fixed rate of 0.15 gallons per second. The pump needs to be able to calculate the total cost of the product dispensed to at least 1/10 th cent = dollars. Right now the pump is design to work for gasoline products could be priced up to $9.00 per gallon. (30 pts) a. The MSP430 will use Timer A2 to measure how long the pump is depressed (i.e. how long product is being delivered). What timer interval should Timer A2 be set to in order to able to measure total cost to 0.1 cents accuracy for a products costing up to $9.00? Which requires finer time resolution to meet the 0.1 cent spec, a higher priced product or a lower priced one? b. Assume that SMCLK has already been configured to equal XT2. Write a function in C to setup TimerA2 using SMCLK divided by 2 as its clock to measure the interval you determined in part (a). Also show your interrupt service routine. c. Assume a user fills up with 12.3 gallons of gas and gas currently cost $6.76 per gallon (OK, assume we're in Europe some place). How long will the fill-up take. What is the accuracy of you pump in cents for gas at this price. Remember, the pump always dispenses at 0.15 gal/sec. d. Now assume that the XT2 crystal used with your MSP430F5529 is on the low end of its tolerance and actually oscillates at 4,000,025 Hz (i.e. it is % off.) What would the error associated with your timer at the end of the 11.4 gallon fill up be given that you designed your timer assuming XT2CLK = 4.0 MHz exactly. Will your actual time count be fast of slow? By how much will you have overcharged or under charged for the gas? Explain.

5 ECE2049 Homework #3 Submitted by: ECE Box #: Date: Question Grade Total (100):

Reading: Davies , 8.3-4, , MSP430x55xx User's Guide Ch. 5,17, MSP430F5529 Launchpad User's Guide

Reading: Davies , 8.3-4, , MSP430x55xx User's Guide Ch. 5,17, MSP430F5529 Launchpad User's Guide ECE2049 Homework #3 Clocks & Timers (Due Thursday 2/8/18 At the BEGINNING of class) Your homework should be neat and professional looking. You will loose points if your HW is not properly submitted (by

More information

ECE PRACTICE EXAM #2 Clocks, Timers, and Digital I/O

ECE PRACTICE EXAM #2 Clocks, Timers, and Digital I/O ECE2049 -- PRACTICE EXAM #2 Clocks, Timers, and Digital I/O Study HW3, Class Notes, Davies Ch 2.6, 5.8, 8, 9.2-3, 9.7, MSP43F5529 User's Guide Ch 5, 17, 28 Work all problems with your note sheet first

More information

ECE2049: Embedded Computing in Engineering Design C Term Spring Lecture #11: More Clocks and Timers

ECE2049: Embedded Computing in Engineering Design C Term Spring Lecture #11: More Clocks and Timers ECE2049: Embedded Computing in Engineering Design C Term Spring 2018 Lecture #11: More Clocks and Timers Reading for Today: Davie's Ch 8.3-8.4, 8.9-8.10, User's Guide Ch. 17 Reading for Next Class: User's

More information

ECE2049 Homework #2 The MSP430 Architecture & Basic Digital IO (DUE Friday 9/8/17 at 4 pm in class)

ECE2049 Homework #2 The MSP430 Architecture & Basic Digital IO (DUE Friday 9/8/17 at 4 pm in class) ECE2049 Homework #2 The MSP430 Architecture & Basic Digital IO (DUE Friday 9/8/17 at 4 pm in class) Your homework should be neat and professional looking. You will loose points if your HW is not properly

More information

ECE2049: Embedded Systems in Engineering Design Lab Exercise #3 C Term Making a Time and Temperature Display

ECE2049: Embedded Systems in Engineering Design Lab Exercise #3 C Term Making a Time and Temperature Display ECE2049: Embedded Systems in Engineering Design Lab Exercise #3 C Term 2019 Making a Time and Temperature Display In this laboratory you will use the MSP430 and several of its peripherals to implement

More information

Timer Module Timer A. ReadMeFirst

Timer Module Timer A. ReadMeFirst Timer Module Timer A ReadMeFirst Lab Folder Content 1) ReadMeFirst 2) TimerModule Lecture material 3) PinOutSummary 4) InterruptsVectorTable 5) Source code for screencast Interrupt Review Overview A Timer

More information

ECE2049: Embedded Computing in Engineering Design A Term Fall 2017 Lecture #16: Interrupts and Event Driven Code

ECE2049: Embedded Computing in Engineering Design A Term Fall 2017 Lecture #16: Interrupts and Event Driven Code ECE2049: Embedded Computing in Engineering Design A Term Fall 2017 Lecture #16: Interrupts and Event Driven Code Reading for Today: Example code Reading for Next Class: Review all since exam 1 HW #4 (on

More information

CPE 325: Embedded Systems Laboratory Laboratory #7 Tutorial MSP430 Timers, Watchdog Timer, Timers A and B

CPE 325: Embedded Systems Laboratory Laboratory #7 Tutorial MSP430 Timers, Watchdog Timer, Timers A and B CPE 325: Embedded Systems Laboratory Laboratory #7 Tutorial MSP430 Timers, Watchdog Timer, Timers A and B Aleksandar Milenković Email: milenka@uah.edu Web: http://www.ece.uah.edu/~milenka Objective This

More information

Timers and Clocks CS4101 嵌入式系統概論. Prof. Chung-Ta King. Department of Computer Science National Tsing Hua University, Taiwan

Timers and Clocks CS4101 嵌入式系統概論. Prof. Chung-Ta King. Department of Computer Science National Tsing Hua University, Taiwan CS4101 嵌入式系統概論 Timers and Clocks Prof. Chung-Ta King Department of Computer Science, Taiwan Materials from MSP430 Microcontroller Basics, John H. Davies, Newnes, 2008 Recall the Container Thermometer Container

More information

ECE2049 HW #1-- C programming and Binary Number Representations (DUE 1/19/2018 At the BEGINNING of class)

ECE2049 HW #1-- C programming and Binary Number Representations (DUE 1/19/2018 At the BEGINNING of class) ECE2049 HW #1-- C programming and Binary Number Representations (DUE 1/19/2018 At the BEGINNING of class) Your homework should be neat and professional looking. You will loose points if your HW is not

More information

ECE2049 HW #1-- C programming and Binary Number Representations (DUE Friday 8/31/2018 At the BEGINNING of class)

ECE2049 HW #1-- C programming and Binary Number Representations (DUE Friday 8/31/2018 At the BEGINNING of class) ECE2049 HW #1-- C programming and Binary Number Representations (DUE Friday 8/31/2018 At the BEGINNING of class) Your homework should be neat and professional looking. You will loose points if your HW

More information

Copyright 2015 by Stephen A. Zajac & Gregory M. Wierzba. All rights reserved..spring 2015.

Copyright 2015 by Stephen A. Zajac & Gregory M. Wierzba. All rights reserved..spring 2015. Copyright 2015 by Stephen A. Zajac & Gregory M. Wierzba. All rights reserved..spring 2015. Copyright 2015 by Stephen A. Zajac & Gregory M. Wierzba. All rights reserved..spring 2015. Copyright 2015 by Stephen

More information

ECE2049: Embedded Computing in Engineering Design C Term Spring 2019 Lecture #22: MSP430F5529 Operating Mode & the WDT

ECE2049: Embedded Computing in Engineering Design C Term Spring 2019 Lecture #22: MSP430F5529 Operating Mode & the WDT ECE2049: Embedded Computing in Engineering Design C Term Spring 2019 Lecture #22: MSP430F5529 Operating Mode & the WDT Reading for Today: User's Guide 1.4, Ch 16 Reading for Next Class: Review all since

More information

5xx Active & Low Power Mode Operation

5xx Active & Low Power Mode Operation 5xx Active & Low Power Mode Operation 38 Lab 2: ULP Operation Lab Goals Learn ULP Best Practices Learn & understand how to configure two key modules of the 5xx to achieve ultra-low power operation. Power

More information

ECE2049 HW #1-- C programming and Binary Number Representations (DUE 9/1/2017 At the BEGINNING of class)

ECE2049 HW #1-- C programming and Binary Number Representations (DUE 9/1/2017 At the BEGINNING of class) ECE2049 HW #1-- C programming and Binary Number Representations (DUE 9/1/2017 At the BEGINNING of class) Your homework should be neat and professional looking. You will loose points if your HW is not properly

More information

Lab 1: I/O, timers, interrupts on the ez430-rf2500

Lab 1: I/O, timers, interrupts on the ez430-rf2500 Lab 1: I/O, timers, interrupts on the ez430-rf2500 UC Berkeley - EE 290Q Thomas Watteyne January 25, 2010 1 The ez430-rf2500 and its Components 1.1 Crash Course on the MSP430f2274 The heart of this platform

More information

University of Texas at El Paso Electrical and Computer Engineering Department. EE 3176 Laboratory for Microprocessors I.

University of Texas at El Paso Electrical and Computer Engineering Department. EE 3176 Laboratory for Microprocessors I. University of Texas at El Paso Electrical and Computer Engineering Department EE 3176 Laboratory for Microprocessors I Fall 2016 LAB 04 Timer Interrupts Goals: Learn about Timer Interrupts. Learn how to

More information

Lab 4 Interrupts ReadMeFirst

Lab 4 Interrupts ReadMeFirst Lab 4 Interrupts ReadMeFirst Lab Folder Content 1) ReadMeFirst 2) Interrupt Vector Table 3) Pin out Summary Objectives Understand how interrupts work Learn to program Interrupt Service Routines in C Language

More information

CPE 323: MSP430 Timers

CPE 323: MSP430 Timers CPE 323: MSP430 Timers Aleksandar Milenkovic Electrical and Computer Engineering The University of Alabama in Huntsville milenka@ece.uah.edu http://www.ece.uah.edu/~milenka Outline Watchdog Timer TimerA

More information

Hacettepe University

Hacettepe University MSP430 Teaching Materials Week 5 FUNDAMENTALS OF INTERFACING AND TIMERS for MSP430 Hacettepe University Elements in Basic MCU Interface Power Source Feeds CPU and peripherals Clock Oscillators System synchronization

More information

ECE2049: Embedded Computing in Engineering Design C Term Spring Lecture #7: More Digital IO

ECE2049: Embedded Computing in Engineering Design C Term Spring Lecture #7: More Digital IO ECE2049: Embedded Computing in Engineering Design C Term Spring 2018 Lecture #7: More Digital IO Reading for Today: Davies 7.5-7.9, Users Guide Ch 12 Reading for Next Class: Davies 7.5-7.9, Users Guide

More information

Moses Jones Application Note ECE 480 Design Team 7 Programming Altimeters. Using MSP 430 Launch Pad 11/8/2013

Moses Jones Application Note ECE 480 Design Team 7 Programming Altimeters. Using MSP 430 Launch Pad 11/8/2013 Moses Jones Application Note ECE 480 Design Team 7 Programming Altimeters Executive Summary Using MSP 430 Launch Pad 11/8/2013 This document will provide a guide of how to use the MSP 430 Launch Pad while

More information

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

Lab 4: Interrupt. CS4101 Introduction to Embedded Systems. Prof. Chung-Ta King. Department of Computer Science National Tsing Hua University, Taiwan CS4101 Introduction to Embedded Systems Lab 4: Interrupt Prof. Chung-Ta King Department of Computer Science, Taiwan Introduction In this lab, we will learn interrupts of MSP430 Handling interrupts in MSP430

More information

2.996/6.971 Biomedical Devices Design Laboratory Lecture 6: Microprocessors II

2.996/6.971 Biomedical Devices Design Laboratory Lecture 6: Microprocessors II 2.996/6.971 Biomedical Devices Design Laboratory Lecture 6: Microprocessors II Instructor: Dr. Hong Ma Oct. 1, 2007 Structure of MSP430 Program 1. Declarations 2. main() 1. Watch-dog timer servicing 2.

More information

University of Texas at El Paso Electrical and Computer Engineering Department. EE 3176 Laboratory for Microprocessors I.

University of Texas at El Paso Electrical and Computer Engineering Department. EE 3176 Laboratory for Microprocessors I. University of Texas at El Paso Electrical and Computer Engineering Department EE 3176 Laboratory for Microprocessors I Fall 2016 LAB 03 Low Power Mode and Port Interrupts Goals: Bonus: Pre Lab Questions:

More information

Welcome to Lab! Feel free to get started until we start talking! The lab document is located on the course website:

Welcome to Lab! Feel free to get started until we start talking! The lab document is located on the course website: Welcome to Lab! Feel free to get started until we start talking! The lab document is located on the course website: https://users.wpi.edu/~sjarvis/ece2049_smj/ece2049_labs.html You do not need to keep

More information

ECE2049: Embedded Computing in Engineering Design A Term Fall Lecture #8: Making it work: LEDs, Buttons & Keypad

ECE2049: Embedded Computing in Engineering Design A Term Fall Lecture #8: Making it work: LEDs, Buttons & Keypad ECE2049: Embedded Computing in Engineering Design A Term Fall 2018 Lecture #8: Making it work: LEDs, Buttons & Keypad Reading for Today: Users Guide Ch 12 Reading for Next Class: Review all reading, notes,

More information

Hacettepe University

Hacettepe University MSP430 Teaching Materials Week 5 FUNDAMENTALS OF INTERFACING AND TIMERS for MSP430 Hacettepe University Elements in Basic MCU Interface Power Source Feeds CPU and peripherals Clock Oscillators System synchronization

More information

ECE2049 Homework #4 Analog-to-Digital Conversion and the ADC12 (Due Thursday 2/15/2018 to box outside AK-011 by 9 am)

ECE2049 Homework #4 Analog-to-Digital Conversion and the ADC12 (Due Thursday 2/15/2018 to box outside AK-011 by 9 am) ECE2049 Homework #4 Analog-to-Digital Conversion and the ADC12 (Due Thursday 2/15/2018 to box outside AK-011 by 9 am) PLEASE (NEATLY) SHOW ALL WORK! Comment all code well. Do not make the grader guess

More information

ECE2049: Embedded Computing in Engineering Design C Term Spring 2018 Lecture #20: Using SPI The DAC

ECE2049: Embedded Computing in Engineering Design C Term Spring 2018 Lecture #20: Using SPI The DAC ECE2049: Embedded Computing in Engineering Design C Term Spring 2018 Lecture #20: Using SPI The DAC Reading for Today: Users Guide Ch 35, MCP4921, data sheet, on-line articles Reading for Next Class: Users

More information

CPE 325: Embedded Systems Laboratory Laboratory #11 Tutorial Analog-to-Digital Converter and Digital-to-Analog Converter

CPE 325: Embedded Systems Laboratory Laboratory #11 Tutorial Analog-to-Digital Converter and Digital-to-Analog Converter CPE 325: Embedded Systems Laboratory Laboratory #11 Tutorial Analog-to-Digital Converter and Digital-to-Analog Converter Aleksandar Milenković Email: milenka@uah.edu Web: http://www.ece.uah.edu/~milenka

More information

Welcome to Lab! Feel free to get started until we start talking! The lab document is located on the course website:

Welcome to Lab! Feel free to get started until we start talking! The lab document is located on the course website: Welcome to Lab! Feel free to get started until we start talking! The lab document is located on the course website: https://users.wpi.edu/~sjarvis/ece2049_smj/ We will come around checking your pre-labs

More information

The 16-bit timer/counter register, TAR, increments or decrements (depending on mode of operation) with each rising edge of the clock signal.

The 16-bit timer/counter register, TAR, increments or decrements (depending on mode of operation) with each rising edge of the clock signal. Timer & Real Time Clock (RTC), PWM control, timing generation and measurements. Analog interfacing and data acquisition: ADC and Comparator in MSP430, data transfer using DMA. Case Study: MSP430 based

More information

ECE2049 Embedded Computing in Engineering Design. Lab #0 Introduction to the MSP430F5529 Launchpad-based Lab Board and Code Composer Studio

ECE2049 Embedded Computing in Engineering Design. Lab #0 Introduction to the MSP430F5529 Launchpad-based Lab Board and Code Composer Studio ECE2049 Embedded Computing in Engineering Design Lab #0 Introduction to the MSP430F5529 Launchpad-based Lab Board and Code Composer Studio In this lab you will be introduced to the Code Composer Studio

More information

ECE2049-E18 Lecture 6 Notes 1. ECE2049: Embedded Computing in Engineering Design E Term Lecture #6: Exam Review

ECE2049-E18 Lecture 6 Notes 1. ECE2049: Embedded Computing in Engineering Design E Term Lecture #6: Exam Review ECE2049-E18 Lecture 6 Notes 1 ECE2049: Embedded Computing in Engineering Design E Term 2018 Lecture #6: Exam Review Administrivia Exam 1: Next Tuesday (6/5) HW4: Short assignment, due Tuesday Lab 1: Due

More information

ECE2049 E17 Lecture 4 MSP430 Architecture & Intro to Digital I/O

ECE2049 E17 Lecture 4 MSP430 Architecture & Intro to Digital I/O ECE2049-E17 Lecture 4 1 ECE2049 E17 Lecture 4 MSP430 Architecture & Intro to Digital I/O Administrivia Homework 1: Due today by 7pm o Either place in box in ECE office or give to me o Office hours tonight!

More information

Texas Instruments Mixed Signal Processor Tutorial Abstract

Texas Instruments Mixed Signal Processor Tutorial Abstract Texas Instruments Mixed Signal Processor Tutorial Abstract This tutorial goes through the process of writing a program that uses buttons to manipulate LEDs. One LED will be hard connected to the output

More information

ECE2049: Embedded Computing in Engineering Design C Term Spring Lecture #3: Of Integers and Endians (pt. 2)

ECE2049: Embedded Computing in Engineering Design C Term Spring Lecture #3: Of Integers and Endians (pt. 2) ECE2049: Embedded Computing in Engineering Design C Term Spring 2018 Lecture #3: Of Integers and Endians (pt. 2) Reading for Today: Davies Ch 2, MSP430 User's Guide Ch 6.1, 6.3 Reading for Next Class:

More information

ECE2049: Embedded Computing in Engineering Design A Term Fall Lecture #9: Exam Review w/ Solutions

ECE2049: Embedded Computing in Engineering Design A Term Fall Lecture #9: Exam Review w/ Solutions ECE2049: Embedded Computing in Engineering Design A Term Fall 2018 Lecture #9: Exam Review w/ Solutions Reading for Today: Review all reading and notes, Davies Ch 1, 2, 4,7, MSP430 User's Guide Ch 6.1,

More information

IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT -2 1 UNIT 2

IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT -2 1 UNIT 2 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT -2 1 UNIT 2 1. Block diagram of MSP430x5xx series micro-controller --------------------- 1 2. CPU architecture of MSP430x5xx ------------------------------------------------

More information

What is an Interrupt?

What is an Interrupt? MSP430 Interrupts What is an Interrupt? Reaction to something in I/O (human, comm link) Usually asynchronous to processor activities interrupt handler or interrupt service routine (ISR) invoked to take

More information

MSP430. More on MSP430

MSP430. More on MSP430 MSP430 More on MSP430 CodeComposer TI recently launched Code Composer Essentials v3. This IDE s latest version (version 3) supports all available MSP430 devices. The new features of CCE v3 include: - Free

More information

CPE/EE 421 Microcomputers

CPE/EE 421 Microcomputers CPE/EE 421 Microcomputers Instructor: Dr Aleksandar Milenkovic Lecture Note S13 *Material used is in part developed by Dr. D. Raskovic and Dr. E. Jovanov CPE/EE 421/521 Microcomputers 1 MSP430 Documentation

More information

Team 3. By: Miriel Garcia. Microcontrollers/ TI MSP430F5438A. ECE 480 senior Design. Application Note 4/3/15

Team 3. By: Miriel Garcia. Microcontrollers/ TI MSP430F5438A. ECE 480 senior Design. Application Note 4/3/15 Microcontrollers/ TI MSP430F5438A ECE 480 senior Design Team 3 Application Note By: Miriel Garcia 4/3/15 Abstract Microcontrollers are key components on today s modern world. These devices have the ability

More information

// Conditions for 9600/4=2400 Baud SW UART, SMCLK = 1MHz #define Bitime_5 0x05*4 // ~ 0.5 bit length + small adjustment #define Bitime 13*4//0x0D

// Conditions for 9600/4=2400 Baud SW UART, SMCLK = 1MHz #define Bitime_5 0x05*4 // ~ 0.5 bit length + small adjustment #define Bitime 13*4//0x0D /****************************************************************************** * * * 1. Device starts up in LPM3 + blinking LED to indicate device is alive * + Upon first button press, device transitions

More information

15.1 Timer_A Introduction

15.1 Timer_A Introduction Chapter 15 is a 16-bit timer/counter with multiple capture/compare registers. This chapter describes. This chapter describes the operation of the of the MSP430x4xx device family. Topic Page 15.1 Introduction.........................................

More information

Welcome to Lab! You do not need to keep the same partner from last lab. We will come around checking your prelabs after we introduce the lab

Welcome to Lab! You do not need to keep the same partner from last lab. We will come around checking your prelabs after we introduce the lab Welcome to Lab! Feel free to get started until we start talking! The lab document is located on the course website: http://users.wpi.edu/~ndemarinis/ece2049/ You do not need to keep the same partner from

More information

IAR PowerPac RTOS for Texas Instruments MSP430 Microcontroller Family

IAR PowerPac RTOS for Texas Instruments MSP430 Microcontroller Family IAR PowerPac RTOS for Texas Instruments MSP430 Microcontroller Family CPU and compiler specifics COPYRIGHT NOTICE Copyright 2008 IAR Systems. All rights reserved. No part of this document may be reproduced

More information

Time. Computer Science and Engineering College of Engineering The Ohio State University. Lecture 37

Time. Computer Science and Engineering College of Engineering The Ohio State University. Lecture 37 Time Computer Science and Engineering College of Engineering The Ohio State University Lecture 37 Interval vs Point Different questions: How long did it take to run 5k? When is our final exam? Answering

More information

2. (2 pts) If an external clock is used, which pin of the 8051 should it be connected to?

2. (2 pts) If an external clock is used, which pin of the 8051 should it be connected to? ECE3710 Exam 2. Name _ Spring 2013. 5 pages. 102 points, but scored out of 100. You may use any non-living resource to complete this exam. Any hint of cheating will result in a 0. Part 1 Short Answer 1.

More information

Finally, a receipt is printed on the screen and, after a pause, the process repeats for the next customer.

Finally, a receipt is printed on the screen and, after a pause, the process repeats for the next customer. 1 CS 215 Spring 2019 Project 1 (Version 1 Jan 24) Learning Objectives: - implementing an application using if/else and loops - introductory use of file input and output - validating user input and formatting

More information

Interrupts CS4101 嵌入式系統概論. Prof. Chung-Ta King. Department of Computer Science National Tsing Hua University, Taiwan

Interrupts CS4101 嵌入式系統概論. Prof. Chung-Ta King. Department of Computer Science National Tsing Hua University, Taiwan CS4101 嵌入式系統概論 Interrupts Prof. Chung-Ta King Department of Computer Science, Taiwan Materials from MSP430 Microcontroller Basics, John H. Davies, Newnes, 2008 Inside MSP430 (MSP430G2551) 1 Introduction

More information

ECE2049-E17 Lecture 6 1. ECE2049: Embedded Computing in Engineering Design E Term Lecture #6: Exam Review

ECE2049-E17 Lecture 6 1. ECE2049: Embedded Computing in Engineering Design E Term Lecture #6: Exam Review ECE2049-E17 Lecture 6 1 ECE2049: Embedded Computing in Engineering Design E Term 2017 Lecture #6: Exam Review Administrivia Exam 1: Next Tuesday (6/6) HW2: Due Tonight at 7pm Lab 1: Due next Tuesday (6/6),

More information

Embedded Systems. 3. Hardware Software Interface. Lothar Thiele. Computer Engineering and Networks Laboratory

Embedded Systems. 3. Hardware Software Interface. Lothar Thiele. Computer Engineering and Networks Laboratory Embedded Systems 3. Hardware Software Interface Lothar Thiele Computer Engineering and Networks Laboratory Do you Remember? 3 2 3 3 High Level Physical View 3 4 High Level Physical View 3 5 What you will

More information

Alex Milenkovich 1. CPE/EE 421 Microcomputers. Course Administration. Review: Outline. Getting Started with EasyWeb2. Review: MSP bit RISC

Alex Milenkovich 1. CPE/EE 421 Microcomputers. Course Administration. Review: Outline. Getting Started with EasyWeb2. Review: MSP bit RISC CPE/EE 421 Microcomputers Instructor: Dr Aleksandar Milenkovic Lecture Note S12 Course Administration Instructor: URL: TA: Labs: Test I: Text: Review: Today: Aleksandar Milenkovic milenka@ece.uah.edu www.ece.uah.edu/~milenka

More information

By the end of Class. Outline. Homework 5. C8051F020 Block Diagram (pg 18) Pseudo-code for Lab 1-2 due as part of prelab

By the end of Class. Outline. Homework 5. C8051F020 Block Diagram (pg 18) Pseudo-code for Lab 1-2 due as part of prelab By the end of Class Pseudo-code for Lab 1-2 due as part of prelab Homework #5 on website due before next class Outline Introduce Lab 1-2 Counting Timers on C8051 Interrupts Laboratory Worksheet #05 Copy

More information

MSP430 Interrupts. Change value of internal variable (count) Read a data value (sensor, receive) Write a data value (actuator, send)

MSP430 Interrupts. Change value of internal variable (count) Read a data value (sensor, receive) Write a data value (actuator, send) MSP430 Interrupts What is an Interrupt? Reaction to something in I/O (human, comm link) Usually asynchronous to processor activities interrupt handler or interrupt service routine (ISR) invoked to take

More information

Network Embedded Systems Sensor Networks Fall Hardware. Marcus Chang,

Network Embedded Systems Sensor Networks Fall Hardware. Marcus Chang, Network Embedded Systems Sensor Networks Fall 2013 Hardware Marcus Chang, mchang@cs.jhu.edu 1 Embedded Systems Designed to do one or a few dedicated and/or specific functions Embedded as part of a complete

More information

ECE2049: Embedded Computing in Engineering Design C Term Spring 2018

ECE2049: Embedded Computing in Engineering Design C Term Spring 2018 ECE2049: Embedded Computing in Engineering Design C Term Spring 2018 Lecture #19: Using SPI The LCD Screen and DAC Reading for Today: User's Manual Ch 35, Davies 101.5, DAC datasheet Reading for Next Class:

More information

Embedded Technosolutions

Embedded Technosolutions MSP430 Tutorial Very Important Low Power Processor For Embedded Systems Applications Introduction Although there are many resources dedicated to teaching microcontrollers and the MSP430 in particular,

More information

UNIVERSITY OF CONNECTICUT. ECE 3411 Microprocessor Application Lab: Fall Quiz II

UNIVERSITY OF CONNECTICUT. ECE 3411 Microprocessor Application Lab: Fall Quiz II Department of Electrical and Computing Engineering UNIVERSITY OF CONNECTICUT ECE 3411 Microprocessor Application Lab: Fall 2015 Quiz II There are 5 questions in this quiz. There are 9 pages in this quiz

More information

CPE/EE 421 Microcomputers

CPE/EE 421 Microcomputers CPE/EE 421 Microcomputers Instructor: Dr Aleksandar Milenkovic Lecture Note S11 MSP430 Documentation MSP430 home page (TI) www.ti.com/msp430 User s manual http://www.ece.uah.edu/~milenka/cpe421-05s/manuals/slau049c.pdf

More information

18-642: Time and Date

18-642: Time and Date 18-642: Time and Date 2/21/2018 Date and Time Anti-Patterns for Date and Time: Daylight savings time hard-coded Time kept without handling time problems Daylight savings time, time zones, mobility Internationalization

More information

University of Florida EEL 4744 Spring 2014 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering 1 April Apr-14 9:03 AM

University of Florida EEL 4744 Spring 2014 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering 1 April Apr-14 9:03 AM Page 1/15 Exam 2 Instructions: Turn off cell phones beepers and other noise making devices. BEAT UCONN! Show all work on the front of the test papers. If you need more room make a clearly indicated note

More information

Getting Started with the Texas Instruments ez430

Getting Started with the Texas Instruments ez430 1 of 6 03.01.2009 01:33 HOME Running Your Code>> Getting Started with the Texas Instruments ez430 Working with the Workbench Software Step 1: Each program needs an associated project. The project includes

More information

CPE 323 Introduction to Embedded Computer Systems: MSP430 System Architecture An Overview

CPE 323 Introduction to Embedded Computer Systems: MSP430 System Architecture An Overview CPE 323 Introduction to Embedded Computer Systems: MSP430 System Architecture An Overview Aleksandar Milenkovic Electrical and Computer Engineering The University of Alabama in Huntsville milenka@ece.uah.edu

More information

MSP430F20xx Device Erratasheet

MSP430F20xx Device Erratasheet Errata MSP430F20xx Device Erratasheet 1 Current Version Devices Rev: BCL12 CPU4 FLASH16 SDA3 TA12 TA16 TA22 USI4 USI5 XOSC5 XOSC8 MSP430F2001 D ü ü ü ü ü ü ü ü MSP430F2011 D ü ü ü ü ü ü ü ü MSP430F2002

More information

CS16 Midterm Exam 2 E02, 10W, Phill Conrad, UC Santa Barbara Tuesday, 03/02/2010

CS16 Midterm Exam 2 E02, 10W, Phill Conrad, UC Santa Barbara Tuesday, 03/02/2010 CS16 Midterm Exam 2 E02, 10W, Phill Conrad, UC Santa Barbara Tuesday, 03/02/2010 Name: Umail Address: @ umail.ucsb.edu Circle Lab section: 3PM 4PM 5PM Link to Printer Friendly PDF Version Please write

More information

Magic 8 Ball. Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name

Magic 8 Ball. Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name MPS Magic 8 Ball Lab Exercise Magic 8 Ball Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name Notes: You must work on this assignment with your partner. Hand in a printer

More information

MSP430 Teaching Materials

MSP430 Teaching Materials MSP430 Teaching Materials Lecture 5 Timers Description of clock signals Texas Instruments Incorporated University of Beira Interior (PT) Pedro Dinis Gaspar, António Espírito Santo, Bruno Ribeiro, Humberto

More information

Timer0..Timer3. Interrupt Description Input Conditions Enable Flag

Timer0..Timer3. Interrupt Description Input Conditions Enable Flag Timer0..Timer3 Timers are pretty useful: likewise, Microchip provides four different timers for you to use. Like all interrupts, you have to Enable the interrupt, Set the conditions of the interrupt, and

More information

ECE 476 LABORATORY 3 SECURITY SYSTEM WEDNESDAY, MARCH 7, 2007

ECE 476 LABORATORY 3 SECURITY SYSTEM WEDNESDAY, MARCH 7, 2007 ECE 476 LABORATORY 3 SECURITY SYSTEM WEDNESDAY, MARCH 7, 2007 ADRIAN WONG BHAVIN ROKAD AW259 BKR24 INTRODUCTION AND PROBLEM FORMULATION The purpose of this lab is to create a security system using a keypad,

More information

Application Report. 1 Hardware Description. John Fahrenbruch... MSP430 Applications

Application Report. 1 Hardware Description. John Fahrenbruch... MSP430 Applications Application Report SLAA309 June 2006 Low-Power Tilt Sensor Using the MSP430F2012 John Fahrenbruch... MSP430 Applications ABSTRACT The MSP430 family of low-power microcontrollers are ideal for low-power

More information

Distributed by: www.jameco.com 1-800-831-4242 The content and copyrights of the attached material are the property of its owner. MSP430F11x2/12x2 Device Erratasheet Current Version Devices MSP430F1122

More information

Fall. Accelerometer RGB LED control Vishal Shah Rebel Sequeira Pratiksha Patil Pranali Dhuru Chris Blackden. George Mason University

Fall. Accelerometer RGB LED control Vishal Shah Rebel Sequeira Pratiksha Patil Pranali Dhuru Chris Blackden. George Mason University Fall 13 Accelerometer RGB LED control Vishal Shah Rebel Sequeira Pratiksha Patil Pranali Dhuru Chris Blackden George Mason University Introduction The ECE 511 course gave us the opportunity to team up

More information

ECE251: Thursday November 8

ECE251: Thursday November 8 ECE251: Thursday November 8 Universal Asynchronous Receiver & Transmitter Text Chapter 22, Sections 22.1.1-22.1.4-read carefully TM4C Data Sheet Section 14-no need to read this A key topic but not a lab

More information

CPE 323 Introduction to Embedded Computer Systems: ADC12 and DAC12. Instructor: Dr Aleksandar Milenkovic Lecture Notes

CPE 323 Introduction to Embedded Computer Systems: ADC12 and DAC12. Instructor: Dr Aleksandar Milenkovic Lecture Notes CPE 323 Introduction to Embedded Computer Systems: ADC12 and DAC12 Instructor: Dr Aleksandar Milenkovic Lecture Notes Outline MSP430: System Architecture ADC12 Module DAC12 Module CPE 323 2 ADC12 Introduction

More information

Lab 0 Introduction to the MSP430F5529 Launchpad-based Lab Board and Code Composer Studio

Lab 0 Introduction to the MSP430F5529 Launchpad-based Lab Board and Code Composer Studio ECE2049 Embedded Computing in Engineering Design Lab 0 Introduction to the MSP430F5529 Launchpad-based Lab Board and Code Composer Studio In this lab, you will be introduced to the Code Composer Studio

More information

University of Texas at El Paso Electrical and Computer Engineering Department. EE 3176 Laboratory for Microprocessors I.

University of Texas at El Paso Electrical and Computer Engineering Department. EE 3176 Laboratory for Microprocessors I. University of Texas at El Paso Electrical and Computer Engineering Department EE 3176 Laboratory for Microprocessors I Fall 2016 LAB 06 Analog to Digital Conversion Goals: Bonus: Pre Lab Questions: Display

More information

Alex Milenkovich 1. CPE/EE 421 Microcomputers: The MSP430 Introduction. Outline

Alex Milenkovich 1. CPE/EE 421 Microcomputers: The MSP430 Introduction. Outline Outline CPE/EE 421 Microcomputers: The MSP430 Introduction Instructor: Dr Aleksandar Milenkovic Lecture Notes MSP430: An Introduction The MSP430 family Technology Roadmap Typical Applications The MSP430

More information

CPE/EE 323 Introduction to Embedded Computer Systems Homework V

CPE/EE 323 Introduction to Embedded Computer Systems Homework V CPE/EE 323 Introduction to Embedded Computer Systems Homework V 1(15) 2(15) 3(25) 4(25) 5(20) Total Problem #1 (15 points) Power, Low power systems A sensor platform features a microcontroller, a sensor,

More information

Hands-On: Implementing an RF link with MSP430 and CC1100

Hands-On: Implementing an RF link with MSP430 and CC1100 Hands-On: Implementing an RF link with MSP430 and CC1100 Keith Quiring MSP430 Applications Engineer Texas Instruments 2006 Texas Instruments Inc, Slide 1 Overview Introduction Target Hardware Library File

More information

University of Texas at El Paso Electrical and Computer Engineering Department. EE 3176 Laboratory for Microprocessors I.

University of Texas at El Paso Electrical and Computer Engineering Department. EE 3176 Laboratory for Microprocessors I. University of Texas at El Paso Electrical and Computer Engineering Department EE 3176 Laboratory for Microprocessors I Fall 2016 LAB 08 UART Communication Goals: Learn about UART Communication and the

More information

May the Schwartz be with you!

May the Schwartz be with you! Department of Electrical & Computer Engineering Tuesday 27 June 17 29-Sep-17 3:54 PM Page 1/13 Exam 1 Instructions: Turn off cell phones beepers and other noise making devices. Show all work on the front

More information

BCIS 3630 Dr. GUYNES SPRING 2018 TUESDAY SECTION [JAN version] GRADER COURSE WEBSITE

BCIS 3630 Dr. GUYNES SPRING 2018 TUESDAY SECTION [JAN version] GRADER   COURSE WEBSITE COURSE WEBSITE http://www.steveguynes.com/bcis3630/bcis3630/default.html Instructor: Dr. Guynes Office: BLB 312H Phone: (940) 565-3110 Office Hours: By Email Email: steve.guynes@unt.edu TEXTBOOK: Starting

More information

Artisan Technology Group is your source for quality new and certified-used/pre-owned equipment

Artisan Technology Group is your source for quality new and certified-used/pre-owned equipment Artisan Technology Group is your source for quality new and certified-used/pre-owned equipment FAST SHIPPING AND DELIVERY TENS OF THOUSANDS OF IN-STOCK ITEMS EQUIPMENT DEMOS HUNDREDS OF MANUFACTURERS SUPPORTED

More information

CS1 Lecture 3 Jan. 18, 2019

CS1 Lecture 3 Jan. 18, 2019 CS1 Lecture 3 Jan. 18, 2019 Office hours for Prof. Cremer and for TAs have been posted. Locations will change check class website regularly First homework assignment will be available Monday evening, due

More information

ECE2049: Homework 1. Consider the following code to compute the average of your exam grades: #define NUM_EXAMS (3)

ECE2049: Homework 1. Consider the following code to compute the average of your exam grades: #define NUM_EXAMS (3) Due: Thursday, 26 May 2016 by 5pm Submission notes: For full credit, please show your work and denote your answers with a circle or a box. Always write and draw your diagrams neatly! We cannot be expected

More information

8051 Peripherals. On-Chip Memory Timers Serial Port Interrupts. Computer Engineering Timers

8051 Peripherals. On-Chip Memory Timers Serial Port Interrupts. Computer Engineering Timers 8051 Peripherals On-Chip Memory Timers Serial Port Interrupts Computer Engineering 2 2-1 8051 Timers 8051 Timers The 8051 has 2 internal 16-bit timers named Timer 0 and Timer 1 Each timer is a 16-bit counter

More information

Towards Hard Real-time Performance in a Highly Asynchronous Multitasking MSP430 Application Andrew E. Kalman, Ph.D.

Towards Hard Real-time Performance in a Highly Asynchronous Multitasking MSP430 Application Andrew E. Kalman, Ph.D. Towards Hard Real-time Performance in a Highly Asynchronous Multitasking MSP430 Application Andrew E. Kalman, Ph.D. Slide 1 Outline Overview Part I: TimerA does PWM Part II: TimerB drives a Stepper Part

More information

Timer 32. Last updated 8/7/18

Timer 32. Last updated 8/7/18 Last updated 8/7/18 Basic Timer Function Delay Counter Load a value into a counter register The counter counts Down to zero (count down timer) Up from zero (count up timer) An action is triggered when

More information

bc620at Developer s Kit User s Guide November, 1998

bc620at Developer s Kit User s Guide November, 1998 bc620at Developer s Kit 8500-0086 User s Guide November, 1998 CHAPTER ONE INTRODUCTION 1.0 GENERAL The bc620at Developer s Kit is designed to provide a suite of tools useful in the development of applications

More information

Interrupts and Timers

Interrupts and Timers Indian Institute of Technology Bombay CS684/CS308 Embedded Systems Interrupts and Timers E.R.T.S. Lab 1 Lab Objective This lab will introduce you to the use of Timers and Interrupts on the TM4C123GH6PM.

More information

Lecture 5: MSP430 Interrupt

Lecture 5: MSP430 Interrupt ECE342 Intro. to Embedded Systems Lecture 5: MSP430 Interrupt Ying Tang Electrical and Computer Engineering Rowan University 1 How A Computer React to Inputs? Polling: the processor regularly looks at

More information

ECE Homework #10

ECE Homework #10 Timer 0/1/2/3 ECE 376 - Homework #10 Timer 0/1/2/3, INT Interrupts. Due Wednesday, November 14th, 2018 1) Write a program which uses INT and Timer 0/1/2/3 interrupts to play the cord C#major for 1.000

More information

***PRACTICE EXAM 02 for*** CS16 Midterm Exam 2 E02, 09F, Phill Conrad, UC Santa Barbara Actual exam scheduled for: 11/18/2009

***PRACTICE EXAM 02 for*** CS16 Midterm Exam 2 E02, 09F, Phill Conrad, UC Santa Barbara Actual exam scheduled for: 11/18/2009 ***PRACTICE EXAM 02 for*** CS16 Midterm Exam 2 E02, 09F, Phill Conrad, UC Santa Barbara Actual exam scheduled for: 11/18/2009 Name: Umail Address: @ umail.ucsb.edu Circle Lab section: 8AM 10AM 11AM noon

More information

Using programmed I/O on the M16C; and Writing an Interrupt Service Routine (ISR)

Using programmed I/O on the M16C; and Writing an Interrupt Service Routine (ISR) Tutorial 2 Basic M16C Programming 1 Introduction The goal for Tutorial 2 is to take a more in-depth look at the sample program from the previous tutorial, and make use of it as a foundation for writing

More information

MATH 099 HOMEWORK TWO

MATH 099 HOMEWORK TWO MATH 099 HOMEWORK TWO STUDENT S NAME 1) Matthew needs to rent a car for 1 day. He will be charged a daily fee of $30.00 in addition to 5 cents for every mile he drives. Assign the variable by letting x

More information

University of Florida EEL 3744 Spring 2018 Dr. Eric M. Schwartz. Good luck!

University of Florida EEL 3744 Spring 2018 Dr. Eric M. Schwartz. Good luck! Page 1/13 Exam 2 Relax! Go Gators! Good luck! First Name Instructions: Turn off all cell phones and other noise making devices and put away all electronics. Show all work on the front of the test papers.

More information

Lab 1 Implementing a Simon Says Game

Lab 1 Implementing a Simon Says Game ECE2049 Embedded Computing in Engineering Design Lab 1 Implementing a Simon Says Game In the late 1970s and early 1980s, one of the first and most popular electronic games was Simon by Milton Bradley.

More information