Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Using a MSP430F5438A 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

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

Database Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

Students also viewed these Databases questions

Question

What is the cerebrum?

Answered: 1 week ago