Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Code given: please only answer by using plp 5.2. ONLY ANSWER IF YOU KNOW THE CORRECT ANSWER! The Task In this project, you will be

image text in transcribed

Code given:

image text in transcribed

please only answer by using plp 5.2.

ONLY ANSWER IF YOU KNOW THE CORRECT ANSWER!

The Task In this project, you will be adding an interrupt service routine (ISR) to an existing program. The program is already fully functional hexadecimal counter that shows the current counter value on the seven-segment display. You will use the timer to generate an interrupt every xcycles (where x can be between 100 and 200 cycles). Your ISR needs to do the following things: Toggle all eight LEDs (i.e. if they are all off, they should all be turned on and if they are already on, turn them off) Perform any tasks necessary to allow another timer interrupt within 100 to 200 cycles 1. 2. No changes should be made to the existing main loop or sseg_display.asm. Code should only be added following the TODO comments. main.asm:25
.org 0x10000000 2 1 $sp, 0x10fffffc # Stack pointer initialization 1 $so, sseg-Lut # Lookup table address used by sseg-display $s1, 0xf070 # Interrupt controller register # Seven segment display 10 |# TODO : enable interrupts below 12 13 14 15 16 |# NOTE: Do not add or modify any code within this main loop 17 main: 18 19 20 21 sseg-display nop addiu $a0, $a0, 1 main 23 24 25 26 |# TODO: add interrupt service routine below The Task In this project, you will be adding an interrupt service routine (ISR) to an existing program. The program is already fully functional hexadecimal counter that shows the current counter value on the seven-segment display. You will use the timer to generate an interrupt every xcycles (where x can be between 100 and 200 cycles). Your ISR needs to do the following things: Toggle all eight LEDs (i.e. if they are all off, they should all be turned on and if they are already on, turn them off) Perform any tasks necessary to allow another timer interrupt within 100 to 200 cycles 1. 2. No changes should be made to the existing main loop or sseg_display.asm. Code should only be added following the TODO comments. main.asm:25
.org 0x10000000 2 1 $sp, 0x10fffffc # Stack pointer initialization 1 $so, sseg-Lut # Lookup table address used by sseg-display $s1, 0xf070 # Interrupt controller register # Seven segment display 10 |# TODO : enable interrupts below 12 13 14 15 16 |# NOTE: Do not add or modify any code within this main loop 17 main: 18 19 20 21 sseg-display nop addiu $a0, $a0, 1 main 23 24 25 26 |# TODO: add interrupt service routine below

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

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions