Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4. (20) Write an ARM assembly language code segment that will input a three-bit binary variable 'x. Use port B for your input port. This

image text in transcribed
4. (20) Write an ARM assembly language code segment that will input a three-bit binary variable 'x. Use port B for your input port. This variable is associated with the first three bits of the port (bits 0-2); whereas the upper five bits (3-7) are unaccounted for and will therefore be allowed to float. You must account for this in your code. Once the port is read and masked appropriately it will then use this value to solve the following function: f(x) x+5x+4 using the look-up table method. Following the computation, it will output the binary result to port C. The program will continuously monitor (poll) the input port and update the output port accordingly. Be sure to include the function's eight solutions in a table (using the DCB directive.) You do not need to set up the ports (DDR, Clock, etc.); simply use them as you can assume that they have been taken care of beforehand using a device driver routine. You should refer to the 8-bit ports as PORTB and PORTC in your program. 4. (20) Write an ARM assembly language code segment that will input a three-bit binary variable 'x. Use port B for your input port. This variable is associated with the first three bits of the port (bits 0-2); whereas the upper five bits (3-7) are unaccounted for and will therefore be allowed to float. You must account for this in your code. Once the port is read and masked appropriately it will then use this value to solve the following function: f(x) x+5x+4 using the look-up table method. Following the computation, it will output the binary result to port C. The program will continuously monitor (poll) the input port and update the output port accordingly. Be sure to include the function's eight solutions in a table (using the DCB directive.) You do not need to set up the ports (DDR, Clock, etc.); simply use them as you can assume that they have been taken care of beforehand using a device driver routine. You should refer to the 8-bit ports as PORTB and PORTC in your program

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

ISBN: 0764532545, 978-0764532542

More Books

Students also viewed these Databases questions

Question

1. Write down two or three of your greatest strengths.

Answered: 1 week ago

Question

What roles have these individuals played in your life?

Answered: 1 week ago

Question

2. Write two or three of your greatest weaknesses.

Answered: 1 week ago