Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

More Books

Students also viewed these Databases questions