Question: Write assembly code ( MSP 4 3 0 ) : Use periodic interrupts generated by Timer B 0 ( B zero ) to make the
Write assembly code MSP:
Use periodic interrupts generated by Timer BB zero to make the green and red 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. While the LEDs are twinkling, the MCU is in low power mode LPM The LEDs are turned on and off while serving interrupts generated by Timer B you are not allowed to utilize any software generated delay loops. Start by downloading the file FinalExamPartasm from Carmen. In that file, I have already configured Timer B to throw periodic interrupts. 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 B interrupt vector is xFFF The interrupt flag is bit TBIFG in the bit register TBCTL Make sure to test and clear the TBIFG bit only DO NOT clear the entire TBCTL register since it holds information that is critical for the correct operation of Timer B
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
