Write a program in PLP assembly that repeatedly reads the value of the switches (address: 0xf0100000)...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program in PLP assembly that repeatedly reads the value of the switches (address: 0xf0100000) and displays a pattern on the LED array based on what switches. Each time the switch value is read, the pattern should be displayed (regardless of whether the switch value has changed or not since the last time it was read). The table below indicates the pattern that should be displayed for each possible switch setting: LED Pattern Switch Hexadecimal Binary Decimal Number Switch Value Switch Value Switch Value 0 0x00000001 0000000001 1 Turn on LEDs 0, 1, 2, and 3, then set all 8 LEDs to off 1 0x00000002 0000000010 2 2 0х00000004 0b00000100 Turn on LEDs 4, 5, 6 and 7, then set all 8 LEDs to off Create a scrolling pattern that moves from right to left starting with LED 1 and skipping every other LED. Only one LED should be on at any given time (i.e., LED 1, then LED 3, then LED 5, then LED 7) and the pattern should end with all LEDs off. Other Other Other Other All LEDs off Hint: Logical shifts are not required to complete this project, but they can be used to make your program shorter and more readable than hard coding every value to be written to the LEDs. Shifts can also be useful to generate the value that you compare with the value of the switches. Write a program in PLP assembly that repeatedly reads the value of the switches (address: 0xf0100000) and displays a pattern on the LED array based on what switches. Each time the switch value is read, the pattern should be displayed (regardless of whether the switch value has changed or not since the last time it was read). The table below indicates the pattern that should be displayed for each possible switch setting: LED Pattern Switch Hexadecimal Binary Decimal Number Switch Value Switch Value Switch Value 0 0x00000001 0000000001 1 Turn on LEDs 0, 1, 2, and 3, then set all 8 LEDs to off 1 0x00000002 0000000010 2 2 0х00000004 0b00000100 Turn on LEDs 4, 5, 6 and 7, then set all 8 LEDs to off Create a scrolling pattern that moves from right to left starting with LED 1 and skipping every other LED. Only one LED should be on at any given time (i.e., LED 1, then LED 3, then LED 5, then LED 7) and the pattern should end with all LEDs off. Other Other Other Other All LEDs off Hint: Logical shifts are not required to complete this project, but they can be used to make your program shorter and more readable than hard coding every value to be written to the LEDs. Shifts can also be useful to generate the value that you compare with the value of the switches. Write a program in PLP assembly that repeatedly reads the value of the switches (address: 0xf0100000) and displays a pattern on the LED array based on what switches. Each time the switch value is read, the pattern should be displayed (regardless of whether the switch value has changed or not since the last time it was read). The table below indicates the pattern that should be displayed for each possible switch setting: LED Pattern Switch Hexadecimal Binary Decimal Number Switch Value Switch Value Switch Value 0 0x00000001 0000000001 1 Turn on LEDs 0, 1, 2, and 3, then set all 8 LEDs to off 1 0x00000002 0000000010 2 2 0х00000004 0b00000100 Turn on LEDs 4, 5, 6 and 7, then set all 8 LEDs to off Create a scrolling pattern that moves from right to left starting with LED 1 and skipping every other LED. Only one LED should be on at any given time (i.e., LED 1, then LED 3, then LED 5, then LED 7) and the pattern should end with all LEDs off. Other Other Other Other All LEDs off Hint: Logical shifts are not required to complete this project, but they can be used to make your program shorter and more readable than hard coding every value to be written to the LEDs. Shifts can also be useful to generate the value that you compare with the value of the switches. Write a program in PLP assembly that repeatedly reads the value of the switches (address: 0xf0100000) and displays a pattern on the LED array based on what switches. Each time the switch value is read, the pattern should be displayed (regardless of whether the switch value has changed or not since the last time it was read). The table below indicates the pattern that should be displayed for each possible switch setting: LED Pattern Switch Hexadecimal Binary Decimal Number Switch Value Switch Value Switch Value 0 0x00000001 0000000001 1 Turn on LEDs 0, 1, 2, and 3, then set all 8 LEDs to off 1 0x00000002 0000000010 2 2 0х00000004 0b00000100 Turn on LEDs 4, 5, 6 and 7, then set all 8 LEDs to off Create a scrolling pattern that moves from right to left starting with LED 1 and skipping every other LED. Only one LED should be on at any given time (i.e., LED 1, then LED 3, then LED 5, then LED 7) and the pattern should end with all LEDs off. Other Other Other Other All LEDs off Hint: Logical shifts are not required to complete this project, but they can be used to make your program shorter and more readable than hard coding every value to be written to the LEDs. Shifts can also be useful to generate the value that you compare with the value of the switches.
Expert Answer:
Answer rating: 100% (QA)
To accomplish this task in PLP assembly language you would typically follow these steps Initialize the necessary hardware components such as the LED array and switch input Continuously read the switch ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
answer the question clearly You are building a flight-control system for which a convincing safety case must be made. Would you assign the tasks of safety requirements engineering, test case...
-
Figure 20.3 describes the Medicare Part D prescription drug benefi t. Look at the Web page www.partd-medicare.com/ in your area and determine the marginal coinsurance rates applicable in each...
-
Samantha, an accrual basis taxpayer, subscribes to a service that updates a database used in her business. In December 2016, Samantha paid the $120,000 subscription for the period January 2016...
-
Tsuge and Matsuo studied the precipitation of Mg(OH) 2 by reacting aqueous solutions of MgCl 2? and Ca(OH) 2 in a 1-liter MSMPR crystallizer operating at 450 rpm and 25?C. Crystal sizes were measured...
-
For maximum power transmission, the maximum tension \(\mathrm{T}_{\max }\) in the belt is equal to: (a) \(\mathrm{Tc}\) (b) \(2 \mathrm{Tc}\) (c) \(3 \mathrm{Tc}\) (d) \(\mathrm{Tc} / 3\)
-
Jessica should have made two payments of $800 each. The first was due 60 days ago and the second payment was due 30 days ago. The two original scheduled payments are to be settled by two equal...
-
Eve Co purchases a machine that had a list price of $10,000 on January 1, 2020 The machine has no estimated residual value and a 2 years estimated useful life. The Company is using the...
-
Orange Corporation manufacturers orange products. During the year, Orange Corporation had the following costs: - Direct materials purchased $82,000 - Direct materials used $137,000 - Factory hourly...
-
A group of friends receives a dinner bill for $87.50. The sales tax rate is 5%. They want to leave a 15% tip on the total bill after tax. How much money will they pay for their diner with tax and tip?
-
How do consolidated statements change "Subsequent to Acquisition"? Discuss the key considerations and adjustments that need to be made in the post-acquisition period. Elaborate on the methods and...
-
You are required to: Write a letter to the managing director, in which you discuss the following: a) The potential weaknesses, and your recommendations for improvements, in internal financial...
-
Harbor Realty had the following account balances taken from their adjusted trial balance for year ending Dec. 31, 20Y1: Depreciation Expense: $7,045 Fees Earned: $806,648 Rent Revenue: $63,645...
-
Mavis purchased an e-bike for her delivery service for $1079. She earned $1366 making deliveries but had to spend $336 for repairs and maintenance. She sold it for $860. What was her holding period...
-
a) Draw the free-body diagram and determine the FIXED-END MMOMENT of the beam above. (6marks) b) Determine the member-end-moments each span using the SLOPE-DEFLECTION method. (8marks) c) Draw the...
-
Where are the olfactory sensory neurons, and why is that site poorly suited for their job?
-
The spread of a computer virus through a computer network can be modeled by: N(t) = 20e0.I5t where N(t) is the number of computers infected and t time in minutes. (a) Determine how long it takes for...
-
Use MATLAB to carry out the following multiplication of polynomials: x(x - 1.7)(x + 0.5)(x - 0.7)(x + 1.5) Plot the polynomial for -1.6 < x < 1.8.
-
The Taylor's series expansion for cosx about x = 0 is given by: where x is in radians. Write a user-defined function that determines cosx using Taylor's series expansion. For function name and...
-
Describe the issues that you considered in each of these facets when you made a recent important purchase.
-
The area of a rectangle is calculated according to the following formula: Design a function that accepts a rectangles width and length as arguments and returns the rectangles area. Use the function...
-
Design a program that gives simple math quizzes. The program should display two random numbers that are to be added, such as: The program should allow the student to enter the answer. If the answer...
Study smarter with the SolutionInn App