— (100 pts)
This lab follows the theme begun in Lab 1, except now, instead of using
printf()
to output text to a terminal screen, you will flash a Morse code message
on one of the LEDs on your MSPM0 Launchpad. Critically, now that you’ve suffered
through the process of trying to achieve precise timing with delays, we’re going
to do it a better way – using a Timer Module Interrupt!
The Autograder will be configured to record the digital output of your Launchpad, and your grade will be based on the details below. Unfortunately, using the SYSTICK register to test precise timing details of your outputs will not work for this lab, as the interrupt process makes it inaccurate. As demonstrated in class, one can use a second timer module (i.e., TIMA1->CTR) rather than SYSTICK to observe proper timing details. HOWEVER, if you follow the state machine approach, this should not be necessary. You may also use another Launchpad configured to count clock edges (project here).
Message specification is as described in Lab 2.
Template code which enables the LFCLK output, and a timer interrupt which yields precise 100 ms timing can be found in this zip archive Lab3.zip. Because we are using interrupts, if you follow the state machine pattern from the template, you do not need to worry about measuring the timing statistics of your code - it is produced for free!
Your main task is to develop a state machine functional form for the morse code transmission problem. In this case, the state machine should have a structure where the next state is completely determined by the current state, and (potentially) the current/next symbol message string.
Scoring criteria