From the course: Getting Started with RISC-V

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

LED matrix application

LED matrix application

- [Instructor] This exercise is almost the same as the one in the examples that come with the Venus VS Code extension. I only changed the logo. For this exercise, I'll explain what the code is doing, but I'll leave it up to you to decide if you want to go through the details. The program drives a matrix of 10x10 LEDs, which are capable of producing any color in combinations of red, green, and blue intensity levels. These levels have 226 possible values for each of these three colors. That comes to over 16 million colors. So the program assigns a color to each LED or pixel, traversing the matrix column by column. Where do these colors come from? At the bottom we have the definition of an array with the colors for all pixels. First, starting at line 53, we have three constant definitions with the .equ directive. Yep, those are the RGB encodings for total black, total white, and a tone of blue I'm using. Then, scrolling…

Contents