Question: Write a C program that will do the following: 1 . Send Ready: message from the dragon 1 2 board to the serial terminal in

Write a C program that will do the following:
1. Send Ready: message from the dragon12 board to the serial terminal in the computer using the serial communication interface in the HCS12.
2. Wait until the user pushes a SW5.
3. Once pushed, the program will make a random delay between 1 to 3 seconds.
4. After that delay, your program will turn on LED 0 and make a tone (500 Hz) on the speaker.
5. Once the user pushes SW2, the tone should stop and LED 0 should go off.
6. Your program will then calculate the time interval in millisecond starting from turning on LED 0 until pushing SW2.
7. Send Your Time Reaction is: T ms to the serial terminal in the computer where T represents that reaction time.
8. Go back to step 1.

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 Programming Questions!