Question: Write a C program that uses Timer B to play notes through the piezo buzzer without using the Timer B ISR (note how the piezo

Write a C program that uses Timer B to play notes through the piezo buzzer without using the Timer B ISR (note how the piezo buzzer is connected to the MSP430FG4618 on the hardwareschematic). Upon startup, the program should play the note G (783.99 Hz) and LED2 should beon. While SW1 is pressed, the note D (587.33 Hz) should be played through the piezo buzzer.When SW1 is released, the buzzer should return to playing note G. While SW2 is pressed, theWDTs ISR should be used to blink LED2 on and off at 1 Hz (0.5 second on, 0.5 second off). Thisshould be accomplished by setting the desired WDT interval from within the Port 1 ISR andusing the WDT ISR to control LED2. When SW2 is released, the WDT should be disabled andLED2 should remain on.

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 Databases Questions!