Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please I need to modify the program code that I am going to show below....For the first task I need to add to the program

Please I need to modify the program code that I am going to show below....For the first task I need to add to the program by making LED2 iluminar whenever either the left button 'S1' or right button 'S2' is pressed. LED2 should stay lit only as long as the button remains pressed. For the second task use the left button 'S1' to decrease the LED1 frequency by a reasonable amount. Use the right button 'S2' to increase the LED1 frequency in a similar fashion. These buttons should adjust the LED1 frequency within a range of perceptible frequencies, such as 0.1Hz to 15Hz.
Once competed, the program should allow me to control the LED1 flash rate with the two push buttons: left for slower and right for faster.
image text in transcribed
This is MSP430 written in C programming. Please I need help I tried already doing the two tasks asked previously above but I couldn't I am not that familiar with MSP430... as you can see what the program above does is to make the LED1 in the MSP430 board to blink on and off, and practice using different timing delays. Now in this same program need to me add the two tasks from above...
#include sp430. h> #include Kmsp430f5438a. h main.c int main (void) f WDTCTL WIDTPW I WDTH OLD: Stop watchdog timer int i P1DIR. BIT1 while (1) P1OUT BIT1 for (i 0; i 20000 i++)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Demystifying Databases A Hands On Guide For Database Management

Authors: Shiva Sukula

1st Edition

8170005345, 978-8170005346

Students also viewed these Databases questions