ECE 2560 Intro to Microcontroller-Based Systems
Spring 2025
Final Exam Part 1
Part 1: Coding task
Pick and implement one of the two blinking patterns below:
1. Simple Red-Green Blinky – basic coding task for reduced number of points (63/70 pts):
Use periodic interrupts generated by Timer B0 (B zero) to make the LEDs to twinkle in a simple alternating pattern: when the green LED is on the red one should be off and vice versa.
For this task, you do not need to implement a state machine.
2. Polyrhythmic Blinky – regular coding task with a state machine (70/70 pts)
Use periodic interrupts generated by Timer B0 (B zero) to make the two LEDs blink in a 3 against 2 polyrhythm: During the time the red LED completes three blinks, the green LED will only blink twice.
For both tasks:
Please watch the short demo video posted to Carmen exhibiting the desired behaviors.
While the LEDs are twinkling, the MCU must be in low power mode (LPM3).
The LEDs are turned on and off while serving interrupts generated by Timer B0, you are not allowed to utilize any software generated delay loops.
Start by downloading the corresponding asm file from Carmen. In both files, I have already configured Timer B0 to throw periodic interrupts (only the frequency is different, faster for the 3:2 polyrhythm). You will write an ISR that services these interrupts. Make sure that your ISR does not modify any core registers.
The memory address for the Timer B0 interrupt vector is 0xFFF4. The interrupt flag is bit TBIFG in the 16-bit register TB0CTL. Make sure to test and clear the TBIFG bit only – DO NOT clear the entire TB0CTL register since it holds information that is critical for the correct operation of Timer B0.
Part 2: Submission – Media Recording, PDF and text files uploaded to Carmen
Media Recording:
Record and submit a short video of yourself and your code in action.
Carmen will do the recording but does not submit the video unless you press the submit button.
Do not forget to press the submit button!
PDF File: Screenshot of your code
Take a screenshot of your main program (including variable definitions if applicable), your ISR and interrupt vectors, and submit in a PDF file.
Text File: Your source code
Save the final version of your source code as txt file so it can be read in Carmen, and make sure that both files reflect your name, e.g., firstname_lastname.txt or name_number.txt.
If your source code is missing, is not in the correct format (i.e., not saved as txt file but PDF etc.) or cannot be opened and built in CCS, you will receive zero points for the assignment regardless of your other submitted files/videos.
If your source code file does not produce the results you demonstrate in your memory browser screenshots or video recordings, that counts as academic misconduct. I have no choice but to refer your case to COAM. Make sure to submit the exact source code that you used to create the video recording.