Write a program to repeat the following tasks continuously-


1. Write a program to repeat the following tasks continuously.

- Turn all four LED lights OFF.
- Wait in a loop until one of the push buttons is pressed.
- After that, all LEDs must start turning ON and OFF five times with a one-second delay in between.

A. Cut and paste the source code.

B. Single-step the code and verify that that the code stays in a loop, waiting for a pushbutton press. Press and hold down SW4, and single-step the code so that it exits out of the loop waiting for a pushbutton press. While you are still holding down the pushbutton, in the Data:1, scroll down and right click on _PT01AD, then left click on Show Location. The value of the PT1AD variable should appear in the Memory window. What is the value of PT1AD? Cut and paste the Memory window showing the value of PT1AD.

C. Press the Reset button on the Tower board and run the code. What are the LED values when you press SW2? Describe what you observe when you press any of the pushbuttons.

2. Write a program to repeat the following tasks continuously.

- Turn all four LED lights OFF.
- Wait in a loop until one of the switches is pressed.
- Use the C-language "switch statement" to select one of the following:

Turn ON LED1 and LED2 if SW1 is pressed;
Turn ON LED2 and LED3 if SW2 is pressed;
Turn ON LED3 and LED4 if SW3 is pressed; and
Turn ON LED4 and LED1 if SW4 is pressed.

- Keep the values ON for three seconds.

A. Cut and paste the source code.

B. Press the Reset button on the Tower board and run the code. What are the LED values when you press SW4? Describe what you observe when you press a different switch when the light is ON.

3. Write a program to create an array called first, initialized with your first name followed by a space, and then your last name in the ROM space. The main code should read each element of this array; convert it to uppercase and save it in an array called second defined in the RAM space.

A. Cut and paste the source code.

B. Single-step the code. In the Data:1 window, right click on the array name first, then left click onShow Location. The initialized data array should appear in the Memory window. Describe how you verify that the data is stored in ROM. Cut and paste the Memory window.

Run the program until all of the characters are copied. In the Data:2 window, Right click on the array name second, then left click on Show Location. The initialized data array should appear in the memory window. Describe how you verify that the data is st

 

Solution Preview :

Prepared by a verified Expert
Other Engineering: Write a program to repeat the following tasks continuously-
Reference No:- TGS01159873

Now Priced at $55 (50% Discount)

Recommended (91%)

Rated (4.3/5)

A

Anonymous user

4/29/2016 8:19:46 AM

In this task, you have to write a program as per the requisite of the problem and as well please attach snap shots wherever required. Write a program to prepare an array called first, initialized by your first name followed via a space, and then your last name in the ROM space. The key code must read every element of this array; transform it to uppercase and save it in an array called second stated in the RAM space. A) Cut & paste the source code. B) Single-step the code. In Data1 window, right click on array name first and then left click on Show Location. The initialized data array must appear in the Memory window. Illustrate how you confirm that the data is stored in ROM. Cut and paste the Memory window. Run the program till all of the characters are copied. In the Data2 window, Right click on array name second and then left click on the Show Location.