8. (15) Write an ARM assembly language code segment that will input a four-bit binary variable 'x'. Use the 16-bit port
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
8. (15) Write an ARM assembly language code segment that will input a four-bit binary variable 'x'. Use the 16-bit port
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,
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