Write a program to repeat the given tasks

Assignment Help Other Engineering
Reference no: EM13874478

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

 

Reference no: EM13874478

Questions Cloud

What is the price of service in terms of e : Given equipment price, E , what is the price of service in terms of E? Competition in the equipment market, however, drives the equipment manufacturer's long-run profit to zero. What is the price of equipment?
Markets and the global economy : Q1. Our markets and the global economy tend to react short term to events such as these. I wanted to share an article from USA today that discusses historical correlations between terror attacks and stock market activity. Please feel free to read and..
Calculating marginal products can be challenging : Calculating marginal products can be challenging
Write down an expression for the wheel monopolists profit : Write down an expression (in terms of w) for the wheel monopolist's profit. Show that for any w> 0, the total profits of the skate and wheel monopolists is lower than the integrated monopolist's profit.
Write a program to repeat the given tasks : 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-..
Company''s products slumped and the company''s earnings : It is the end of 2010 and you are an accountant for the Stone Company.
Discuss the operational aspects related to the chosen menus : Discuss the categories of food and beverages offered, price ranges, and the hours of operating hours. Discuss the operational aspects related to the chosen menus; staffing needs, HACCP concerns, service standards, and equipment needs
Continuous compounding for all maturities : A stock is expected to pay a dividend of $2.60 per share in 1 months and in 4 months. The current stock price is $58, and the risk-free interest rate is 8% per annum with continuous compounding for all maturities. An investor has just taken a long po..
Net cash provided by operating activities : How do the direct and the indirect methods differ in their approach to computing the net cash provided by operating activities?

Reviews

Write a Review

Other Engineering Questions & Answers

  Countercurrent multistage leaching process

Fresh halibut livers containing 25.7 wt % oil are to be extracted with pure ethyl ether to remove 95% of the oil in a countercurrent multistage leaching process.

  Estimate for the standard deviation issues

If the probability of Caesarean birth is 0.30, and 140 in a sample of 500 births are Caesarean, which of these numbers is n?

  Assignement on mars climate orbiter (mco)

The mission of the MCO was to gather Martian climate data and serve as a relay station for the Mars Planet Lander (MPL), which would follow shortly thereafter. For nine months the MCO traveled through space. Some unplanned course corrections were ..

  Discuss the evolution and codification of engineering design

Discuss the primary need or needs that were being addressed in each period. Discuss the evolution and codification of the engineering design process over the course of these four periods. What kind of societal entities became involved in the proces..

  Design a suitable vapour compression refrigeration system

Design a suitable vapour compression refrigeration system to achieve this duty, a suitable chilled water piping system to achieve the required duty and suitable heat rejection facilities for the refrigeration plant using a cooling tower.

  A linear time-invariant discrete-time system issues

Use Matlab to obtain the poles of the system. Is the system stable? Explain.

  Write a literature review on the kerr effect

Write a Literature Review on the Kerr Effect.

  Actors will interact with the processes on the use case

create a use-case diagram for the crm system following the uml guidelines in appendix a of the textbook.doc sharing

  Double the thermal efficiency

A Carnot heat engine is operating between a source at TH and a sink at TL. If it is desired to double the thermal efficiency of this engine, what should the new source temperature be? Assume the sink temperature is held constant.

  Define steady state diffusion and non steady diffusion

Define steady state diffusion and non steady diffusion, respectively, using words, equation or diagrams.

  Heat and humidity in an underground mining situation

List the main sources of heat and humidity in mines and briefly describe the methods that can be used to control heat and humidity in an underground mining situation.

  Object modelling

Sequence Diagram

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