Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write an interrupt driven RISC - V MCU program that drives 8 LEDs. Each time there is an interrupt, the program reads a 4 -
Write an interrupt driven RISCV MCU program that drives LEDs. Each time there is an interrupt, the program reads a bit value from the input port. After reading values interrupts the program averages those values and outputs the LED pattern corresponding to the average to the LEDs. The LEDs thus represent a visual representation of the average of the value read from the input when each time there was an interrupt. Assume an external device connected to the RISCV MCU generates an interrupt and provides an input value for reading. You must use the provided LUT for this problem. The dark circles in the diagram below represent the on LEDs. Note the difference in average value and the patter on the LEDs that need to be output.
LED port address xC
Input port address x
Dont use IO instructions in the interrupt service routine
Minimize the number of instructions in your solution
data # total values
mylut: byte xxxxxxxx #LED output patterns
byte xCxExFxxxCxExF
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started