Question: Using NIOS II assembly language write a program to Use 8 external switches to determine a 2-digit hexadecimal number and show each digit on two

Using NIOS II assembly language write a program to Use 8 external switches to determine a 2-digit hexadecimal number and show each digit on two separate 7-segment displays. I currently have a DE0-Nano computer microcontroller and the first 7-segment display is connected to JP2 pins DO-D6 and the second display connected to pins D7-D13. Below Is the code I have tried so far to get the 7 Segment displays to light up.

.equ JP1_PORTS, 0x10000060 .equ JP2_PORTS_DIR, 0x10000074 .equ JP2_PORTS, 0x10000070 .equ O, 0xFFFFFFFF

.text .global _start _start: movia r2, JP1_PORTS movia r3, JP2_PORTS_DIR movia r4, O stwio r4, 0(r3)

movia r3, JP2_PORTS

loop: ldwio r5, 0(r2) stwio r5, 0(r3) br loop

Please only answer in NIOS II assembly, Thank You.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!