
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

Project Ten RPG Skips Page 1 of 1
Complete by: Wednesday April 1 for an A+
For this project, awaken the chip every ten milliseconds and check whether the RPG has changed. On the lower-middle of the LCD, integrate CW and CCW changes into position, from 0 to 59.
Maintain a state variable, CW that equals 1 if the last change was CW and 0 if it was CCW.
We will define a “skip” as a 00˝11, 11 ˝00, 01 ˝10, or 10˝01 change. In the lower-left corner of the display, show the number of “fast skips” that have occurred (with just one loop time between changes). For each fast skip, change the position by two counts, using the CW state variable to add or subtract two from the position.
In the lower-right corner of the display, show the number of slow skips that have occurred (with two or more loop times between changes). In all of this, use the 60 inc/dec per revolution native resolution of the RPG.
Blink the LED for two seconds every time that any skip occurs. If another skip occurs during the two seconds, re-time the two-second blink from the time of the most recent skip.
Display your team handle in the middle of the top line of the display.