Question: Write assembly code ( MSP 4 3 0 ) : Use periodic interrupts generated by Timer B 0 ( B zero ) to make the

Write assembly code (MSP430):
Use periodic interrupts generated by Timer B0(B 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 (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 file Final_Exam_Part_1.asm from Carmen. In that file, I have already configured Timer B0 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 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.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!