Write a program to create an array called first

Assignment Help Programming Languages
Reference no: EM13802731

Write, compile, and load the program given in the example above.

A. Single-step the code and execute the first line in the body of the "for loop." In the Data:2 window, right click on mybyte, then left click on Show Location. The value of the mybyte variable should appear in the Memory window.  Cut and paste the Memory window showing the value of mybyte.

 

B. Press and hold down the SW1 pushbutton and continue single-stepping one loop cycle while you hold down the SW1. What is the value of mybye after single-stepping the statement:  "mybyte  = PT1AD;". In the Data:2, right click on mybyte, then left click on Show Location. The value of the mybyte variable should appear in the Memory window. The value of the mybyte variable should appear in the Memory window.  Cut and paste the Memory window showing the value of mybyte.

C. Single-step the line PTT = mybyte. Which LED light turns ON?

D. Press the Reset button on the Tower board and run the code. What are the LED values when you press SW2?

2. 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.

3. 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.

4. 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.

Reference no: EM13802731

Questions Cloud

Evaluate porters three-phase process : Evaluate Porters three-phase process for defining a company strategy in relation to your chosen organisation - Create a simple chart of the recommended change and address the issues in each phase for your organisation.
Consequences of not having verification practices : How could Administrative, Technical, and Physical Controls introduce a false sense of security? What are the consequences of not having verification practices?
Difference between electromotive force and potential differe : What is the difference between electromotive force and potential difference?
Write descriptive report about culture of a group of people : write a descriptive report about the culture of a group of people, a company, or an organization based on background research and an interview of a professional person who is part of that culture.
Write a program to create an array called first : 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 ..
Write an bibiliography on book due diligence in cyberspace : Write an annotated bibiliography about the book "Due Diligence in Cyberspace".
Canada''s economic growth using charts : a) Research the trade deal in 2000. Identify the leaders of China, the United States, and Canada at the time of the deal. Describe the deal providing reasons why each country would be in favour of the deal at the time. Illustrate what the deal was su..
Practical compromise during divorce : Practical Compromise During Divorce
Public utility are usually identify as monopolies : Public utility are usually identify as monopolies. With whom does Arizona public service, the electric utility in metro phoenix compete? Are they the only provider in their marketplace?

Reviews

Write a Review

Programming Languages Questions & Answers

  Create-implement program which creates exception

Create and implement a program which creates an exception class called StringTooLongException, designed to be thrown when string is discovered that has too many characters in it.

  Pseudocode to read in data file containing student names

Read in a data file containing student names, ID number, and gender into an array. Print the contents of each record using the array.

  Create an application that manipulates a billboard sign

Create an application that manipulates a billboard sign. The program must include a Billboard class (separate from the main program class) that is capable of storing the text to display.

  Accepts two int arguments and returns their sum

Assume the availability of a class named Arithmetic that provides a static method , add , that accepts two int arguments and returns their sum .

  Create application which gets customer account data

Some interest Credit Company gives loans to customers at 1.5 percent interest per month. Create the application which gets customer account data which includes the account number, customer name, and balance due.

  Utilizing the step-by-step mrp calculation process students

utilizing the step-by-step mrp calculation process students will solve the following mrp problem given product a is an

  Write the program which reads two strings

Write the program which reads 2 strings, age (as a 4 bit binary number) followed by first name from keyboard then converts age from binary to decimal and prints out age in decimal.

  Create procedure that returns most recent order information

Create a procedure that returns the most recent order information for aparticular basket. This procedure should determine the most recent stage entry

  Computing return value after execution of program

Compute return value of Antony after its execution?

  Function to responds- to click anywhere on page-display box

Write a function that responds to a click anywhere on the page by displaying an alert dialog. display the event name if the user held shift during the mouse click.

  Catch and handle the error thrown by the code

Catch and handle the error thrown by the code. Redirect the user back to the login screen and display a friendly error message stating that the credentials were incorrect

  Find the position s of a body in linear motion

How many miles will the car go during the period of acceleration from zero to 60 mph? Use the given program to answer this question - Prepare code to declare variables for s0, v0, a, and t, and then write the code to compute s on the basis of these ..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd