- Write a RISC-V assembly language program that does the following:
- Counts the number of button-press pairs received by the system; a push of the middle-most button on the development board should generate an interrupt; the system does not react to the first interrupt, but reacts to the second interrupt. The count sequence is also dependent upon whether the right-most switch is in the up or down position.
If the switch is up, the count increments on the second button press - If the switch is down, the count decrements on the second button press
- The count clamps at 25 and 0:
- When counting up, the count stops at 25 and then only responds to the switch in the down position.
- When counting down, the counter stops at O and then only responds to the switch being in the up position.
- Use lead-zero blanking on the 7-segment display when appropriate
- Display your working hardware implementation to your instructor (or take a video and provide a link to the video in your lab submission).
I'm saving you some grunt work by including Figure 39, which provides the active low segment data for the values in the range [0,9]. Keep in mind that the anodes are also active low.
.data sseg:
.byte 0x03,0x9F, 0x25, 0x0D, 0x99, 0x49, 0x41,0x1F, 0x01,0x09 # LUT for 7-segs