Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Programming Language Expert

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.

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M91372733
  • Price:- $80

Guranteed 48 Hours Delivery, In Price:- $80

Have any Question?


Related Questions in Programming Language

Question - create a microsoft word macro using vba visual

Question - Create a Microsoft Word macro using VBA (Visual Basic for Applications). Name the macro "highlight." The macro should highlight every third line of text in a document. (Imagine creating highlighting that will ...

Assignment - haskell program for regular expression

Assignment - Haskell Program for Regular Expression Matching Your assignment is to modify the slowgrep.hs Haskell program presented in class and the online notes, according to the instructions below. You may carry out th ...

Question 1 what is hadoop explaining hadoop 2 what is

Question: 1. What is Hadoop (Explaining Hadoop) ? 2. What is HDFS? 3. What is YARN (Yet Another Resource Negotiator)? The response must be typed, single spaced, must be in times new roman font (size 12) and must follow t ...

Task working with arraysoverviewin this task you will

Task: Working with Arrays Overview In this task you will create a simple program which will create and work with an array of strings. This array will then be populated with values, printed out to the console, and then, w ...

Task arrays and structsoverviewin this task you will

Task: Arrays and Structs Overview In this task you will continue to work on the knight database to help Camelot keep track of all of their knights. We can now add a kingdom struct to help work with and manage all of the ...

Structs and enumsoverviewin this task you will create a

Structs and Enums Overview In this task you will create a knight database to help Camelot keep track of all of their knights. Instructions Lets get started. 1. What the topic 5 videos, these will guide you through buildi ...

Task - hand execution of arraysoverviewin this task you

Task - Hand Execution of Arrays Overview In this task you will demonstrate how arrays work by hand executing a number of small code snippets. Instructions Watch the Hand Execution with Arrays video, this shows how to ste ...

Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

Question 1 what is a computer program what is structured

Question: 1. What is a Computer program? What is structured programming? 2. What is modular programming? Why we use it? 3. Please evaluate Sin (x) by infinite series. Then write an algorithm to implement it with up to th ...

Task silly name testeroverviewcontrol flow allows us to

Task: Silly Name Tester Overview Control flow allows us to alter the order in which our programs execute. Building on our knowledge of variables, we can now use control flow to create programs that perform more than just ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As