CE-2800 Embedded Systems Software
Lab 4: Bouncing Light Revisited

Objectives

Assignment

In this lab, you will modify the "bouncing light" program from Lab 3 such that the behavior of the LEDs is affected by the position of the on-board switches labeled SW1, SW2, INT0, and INT1. Specifically, your program must:

  1. Begin by lighting a single LED - specifically, LED 0. The position of the LED should not change initially.
  2. When SW1 is pressed, the LEDs should sweep to the left continuously - as long as the switch is pressed. The delay between successive LEDs should be the same as it was in Lab 3. After the sweep moves all the way to the left (to LED 7), the sweep should repeat from LED 0.  If the switch is released, the LED sweep should stop. The sweep may stop in the middle of a sweep (for instance, on LED 4) - it should not continue to the end.
  3. When SW2 is pressed, the LEDs should sweep to the right continuously - as long as the switch is pressed. After the sweep moves all the way to the right (to LED 0), the sweep should repeat from LED 7. If the key is released, the LED sweep should stop. The sweep may stop in the middle of a sweep. The same delay between successive LEDs should be used.
  4. When both INT0 and INT1 are pressed at the same time, the currently "on" LED should blink.
  5. The behavior when pressing any other combination of switches (e.g. SW1 and SW2) simultaneously is up to you. It is acceptable to make the program act like no switches at all are pressed in these cases.

Design constraints:

Hints:

Demonstration

You must demonstrate your working program on your board before the submission date.

Lab Submission (due 11:00pm, Tuesday, January 10, 2012)

For your submission, you need only supply your working, fully commented Lab4.asm file.

Upload your submission through Blackboard (assignment "Lab 4").

Be sure to keep copies of all your files, in case something gets lost.

Grading

Your lab grade will be determined by the following factors:

Program - comments and formatting are important aspects of assembly language programming! And it has to work correctly.

Timeliness of submission as stated in the course policies.