Question: Embedded systems/ assembly code question thanks!! Fill in the immediate operands with hexadecimal numbers that initialize Port B. Bits 0, 1, and 2 are input.
Fill in the immediate operands with hexadecimal numbers that initialize Port B. Bits 0, 1, and 2 are input. Bits 3 and 5 are output. PortB_Init LDR R1, =SYSCTL_RCGCGPIO_R LDR R0, [R1] ORR R0, R0, ------------------------------------------- STR R0, [R1] NOP NOP LDR R1, =GPIO_PORTB_DIR_R LDR R0, [R1]/-- ORR R0, R0, #-----------------------------------------------/BIC R0, R0, #-----------------------------------------------------\ STR R0, [R1] \---- LDR R1, =GPIO_PORTB_AFSEL_R LDR R0, [R1] BIC R0, R0, #-------------------------- STR R0, [R1] LDR R1, =GPIO_PORTB_DEN_R LDR R0, [R1] ORR R0, R0, #------------------------- STR R0, [R1] BX LR Write an assembly language main program that first calls the initialization and then performs steps 2, 3, and 4 over and over infinitely. execute PortB_Init defined in Question 1.1. read the inputs; if all three inputs are equal to each other (inputs are 000 or 111) then toggle output bit 3, otherwise (inputs are 001, 010, 011, 100, 101, or 110) toggle output bit 5. Write friendly code. Comments are allowed but not needed
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
