Introduction to Embedded Systems :: CSCI 255
Lab Assignments
Lab 7
-- Scroll LEDs V2


HOME        SYLLABUS        HOMEWORK        LABS        LINKS        NOTES









Due:  End of Lab Session (11.4.2013)

Requirement:  Bread Board, Jump Wires, MSP430, LEDs, and work with your lab partner on the code

The goal of this assignment is to gain more experience using Interrupt Service Routines, WatchDog Timer, begin programming MSP430 functionality in C-language, and practice using the integrated debugger in the CCS IDE.

Examples:

++++Button example in C-language

++++MSP430G2553 Header File

++++WDTimer Interrupt example in C-language (with Low Power MODE)

See how it works

 

C-Programming Basics:

My Summary slides from : C-Programming in less than an hour

 

Part 1: Scroll to the Left

Initial part of the lab is just being able to blink P1.0 using an Interrupt Service Routine (ISR). This lab must be programmed in High Level C-Language and make sure that your ISR code blinks every 0.25 second by using the WatchDog Timer at your preferred frequency (just be aware of using the proper timing constants & number of interrupts that will occur). Once the LED is lid up at BIT 7, make sure it wraps around back to BIT 0 and continues scrolling. At this point the program should run like this "forever". Have Clint, Matt or Damian check-out part 1.

See how it works

 

Part 2: Push Button & Scroll to the Right

Same as Part 1; however when pressing P1.3 button, the program will start scrolling to the RIGHT from its current position. Make sure that it wraps around once scrolling to the right. The program at this point: 1) if button is never pressed the LEDs scroll left "forever", or 2) Once button is pressed, the LEDs will scroll to the right "forever". Be aware that debouncing of the button may occur and skipping will be noticeable.  Have Clint, Matt or Damian check-out part 2.

See how it works

 

Part 3: Toggle Scroll Direction

Starts with Part 1; however, each time the P1.3 Button is pressed, the LEDs toggle its direction from its current position. At this point, the program should be able to change direction of the scroll of the LEDs each time the button is pressed. Have Clint, Matt or Damian check-out part 3.

See how it works

 

Submission:

1 - Have each part of the lab checked out by Matt, Clint or Damian by showing your code, flashing your code to the board, and display working circuit.

2 - Print your final code from Part 3 with the following header:

/***************************************************
* Names
* Lab x assignment
* filename: yyyyyyyyy.asm
*
* Description of the assignment
*
***************************************************/

3 - Make sure you have a well commented code


Copyright © 2011 by Keith Vertanen.

 


Montana Tech -- College of Letters, Science & Professional Studies -- Computer Science Department
All Rights Reserved and Copyright © 2013 by Damian Valles