Homework 8
MSP430
Interrupt and
Polled
Programming

Modified

Overview

The purpose of the assignment is to develop some skills programming interrupts and polled input. The assignment examines hardware interrupts generated by a timer and polled input from a push button.

Assignment 1

The assignment is based on the polled push button of the MSP430 Getting Started notes on Emulation using the Code Composer.

Turn on the red LED when the push button is pressed.

Assignment 2

The assignment is based on the MSP430 Timer notes.

Toggle the green LED at regular intervals of approximately 1/2 second.

Assignment 3

Combine the polled push button and timer programs to:

  1. Turn on the red LED when the push button is pressed,
  2. Toggle the green LED at regular intervals of about approximately 1/2 second.

Equipment

Two Launchpads are in LF111A in counter drawers labeled C335 and several of the computers there have CCS installed.

If you need access to LF111A outside of normal hours, contact the instructor for a building pass.

Turn in

  1. Cover page  - Your name, date, and Homework 8. Staple all papers together.
  2. Listing of Homework 8 Assignment 1, 2 and 3 programs.
  3. Set a breakpoint in the timer interrupt routine and display registers Port_1_2 and Timer_A2 similar to at right:
  4. Demonstration - Show program execution to the instructor.

Hints

  1. Use either Assembler or C.
  2. In the timer program, the CPU was turned off and interrupts enabled, preventing any code execution until an interrupt occurs.

    While polling the push button, the CPU cannot be turned off, enable interrupts only when polling.