Montana Tech of The University of Montana
Computer Science & Software Engineering

CSCI 255
Introduction to Embedded Systems
Fall 2011


Lab #7 - Scrolling LEDs

DUE: Mon Oct 31st, 2PM
Create an assembly language program that uses a 16-bit timer and interrupt service routines to make an LED scrolling display. The LEDs show a particular pattern (initially a single on LED) that scrolls left at a certain speed. The pattern should wrap around. When a 1-0 transition is detected on INT0, the LEDs should update themselves to a seemingly random pattern obtained from the low byte of your running 16-bit timer. The INT0 interrupt should be high-priority while the timer interrupt updating the LEDs should be low-priority.

The speed of the scrolling is controlled by the push buttons. Initially the LEDs should update themselves once every second. Pressing the leftmost push button causes the update to speed up by 0.02 seconds. Pressing the rightmost push button causes the update to slow down by 0.02 seconds. The minimum time delay between changing the LEDs should be 0.02 seconds. The maximum time delay should be 2 seconds.

If you use timer2, the Keil IDE does not have equates automatically defined for the T2CON SFR, etc. Put this code at the start of your program.
Submission. Submit your program to the Lab #7 dropbox on Moodle. Be sure your submitted source file has the required header with your name, username, and a description of the program. Your program will be graded on functionality, readability and elegance.

Page last updated: August 16, 2012.  Copyright © 2011 by Keith Vertanen.