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

  Develop an algorithm to study the percolation probability

Develop an algorithm to study the percolation probability of overlapping circular disks in a unit square domain.

  Calculate the rate at which hydrogen escapes from the sphere

Hydrogen gas at a pressure of 1.25 bar is contained in a thick-walled neoprene rubber sphere which has inner and outer radii of 70 mm and 80 mm, respectively. The concentration of hydrogen at the outer surface of the sphere is negligible and leaka..

  How much improvement in separation is produced

Reevaluate the separation using the same total amount of solvent in a counter-current cascade. How much improvement in separation is produced?

  Minimize the total operating cost

formulate a linear programming model for this problem. Define decision variables, and then define your constraints and objective function accordingly. Combine everything to get the final model.

  Design a coal overburden throw

Design a coal overburden throw/cast blast for the situation - Blast length 900 m

  Effect on the top event frequency

Describes briefly the safety procedure that should be implemented prior to entering a vessel and describes the main requirments of any documentation that could accompany vessel entry particularly with reference to certificates or permits

  Modern industrial wireless modems

1. List three basic technologies used in modern Industrial wireless modems 2. List two issues you should be aware of when deciding on whether you should implement a link at 900 MHz or 2.4 GHz.

  Interval for preventing intersymbol interference

What is the minimum guard time interval for preventing intersymbol interference? What is the maximum data rate (BPSK signaling) where minimum SINR is 40 (in linear scale)?

  Determine the design of the cut

Determine the design of the cut, including burden and spacing for each element of the cut - burden and spacing of the easer, perimeter and lifer holes

  1 using the graph of porefracture pressure for the holly

1. using the graph of porefracture pressure for the holly field propose a casing scheme for the well using the

  Design and implement improvements to the nickel-iron battery

The methodology in summary form is to design and implement improvements to the nickel-iron battery. This is your basic methodology, which needs more detail in the type of tests you will perform.

  Question regarding the cross-sectional area

A coil with 380 windings is wound around a cast iron ring. the cast iron ring has a mean diameter of 125mm and a cross-sectional area of 600mm squared. The magnetic field strength is 3000Am while the relative permeability of the core is 780. deter..

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