Question: Using a MSP43058A board, and the language C; do the follwing; In this lab, you will use the timer module to execute concurrent synchronous state

Using a MSP43058A board, and the language C; do the follwing;

In this lab, you will use the timer module to execute concurrent synchronous state machines (syncSM) at a specified period. Create three syncSMs that do the following:

1.) SynchSM1: Read and debounce SW1

2.) SynchSM2:If SW1 has been pressed, blink LED1 and P7.4 in the following pattern: on for 2seconds, off for 1 second, then flash 4 times with a period of 500 ms. The LED1 pattern should only occur once per SW1 press. If SW1 is held down continuously, the pattern should NOT repeat.

3.) SynchSM3:If SW1 is held down the entire time that synch SM2 is blinking LED1, then LED1, LED2, and P7.4 should turn on for 1 second and then turn off. If SW1 is pressed continuously, nothing should occur until next press of SW1.

NOTE: The main() function of your code should setup the timer module, initialize the ports, and then set the GIE bit. Once the GIE bit is set, the microcontroller should enter low power mode 3. You should call the tick functions for each state machine using the timer interrupt. Your code should NOT use the Port 2 interrupt. Your code should use variables to communicate between synchSMs.

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!