ECE 271 LAB 5 Spring 2012 PURPOSE: Practice in 68HC11 programming, writing code using a flowchart, using variables in memory. EXERCISE: Write a program which will cause a pattern to appear on the LEDs which simulates a "ball" moving back and forth. The "ball" will start at the left and go back and forth five times, moving 5 positions per second. You should follow the flowchart on the back as closely as possible. Your program will have a data area containing the following two variables: a direction "flag" and a count of the number of complete cycles made. Use equates to define two possible directions. For example, equate "RIGHT" to zero and "LEFT" to one. To move the ball to the next position, use a rotate instruction. Preceed this with a clear carry instruction. PRELAB: Have your program written before coming in to lab on your lab day. We will be looking carefully at what you have written at the start of lab. Prelab will account for half of your lab grade. NOTES: 1. Org your code at $8800. 2. Doing just the above will get you a 9 out of 10 grade. Do more for 10 points. Pong anyone? 3. Get your listing signed by a lab monitor and turn it in.