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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started