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

  Characterization technology for nanomaterials

Calculate the reciprocal lattice of the body-centred cubic and Show that the reciprocal of the face-centred cubic (fcc) structure is itself a bcc structure.

  Calculate the gasoline savings

How much gasoline do vehicles with the following fuel efficiencies consume in one year? Calculate the gasoline savings, in gallons per year, created by the following two options. Show all your work, and draw boxes around your answers.

  Design and modelling of adsorption chromatography

Design and modelling of adsorption chromatography based on isotherm data

  Application of mechatronics engineering

Write an essay on Application of Mechatronics Engineering

  Growth chracteristics of the organism

To examine the relationship between fermenter design and operating conditions, oxygen transfer capability and microbial growth.

  Block diagram, system performance and responses

Questions based on Block Diagram, System Performance and Responses.

  Explain the difference in a technical performance measure

good understanding of Mil-Std-499 and Mil-Std-499A

  Electrode impedances

How did this procedure affect the signal observed from the electrode and the electrode impedances?

  Write a report on environmental companies

Write a report on environmental companies

  Scanning electron microscopy

Prepare a schematic diagram below of the major parts of the SEM

  Design a pumping and piping system

creating the pumping and piping system to supply cool water to the condenser

  A repulsive potential energy should be a positive one

Using the data provided on the webvista site in the file marked vdw.txt, try to develop a mathematical equation for the vdW potential we discussed in class, U(x), that best fits the data

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