Page 1 of 1

8. (15) Write an ARM assembly language code segment that will input a four-bit binary variable 'x'. Use the 16-bit port

Posted: Fri May 20, 2022 10:44 pm
by answerhappygod
8 15 Write An Arm Assembly Language Code Segment That Will Input A Four Bit Binary Variable X Use The 16 Bit Port 1
8 15 Write An Arm Assembly Language Code Segment That Will Input A Four Bit Binary Variable X Use The 16 Bit Port 1 (48.99 KiB) Viewed 23 times
8. (15) Write an ARM assembly language code segment that will input a four-bit binary variable 'x'. Use the 16-bit port A for your input port. This variable is associated with bits 0 - 3 of port A. The rest of the port's bits are unaccounted for and will float to an unknown value. You must account for this in your code. Once the port is read and adjusted) it will then pass this value into the function: f(x) = x2 + 5x +4 using the look-up table method. After retrieving the correct answer from the table, it will then output the binary result to port B. The program will continuously monitor (poll) the input port and update the output port accordingly. Use indirect addressing mode instructions for input and outputs. Be sure to include the function's sixteen solutions in a table. Also be careful on which Define Constant directive that you choose. 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 16-bit ports as PORTA and PORTB in your program,