Scroll a message through six seven-segment displays
Online version: https://fpga.labsland.com/altera/computer-organization/lab-06/part-05/
Debugger setup
CPUlator simulatorC · DE1-SoC Nios V computer, simulated in your browser. No board or sign-in needed.
- Get the sourceDownload
main.c - Open the simulatorOpen CPUlator
The simulated DE1-SoC Computer has room for six characters. Your C program holds an eight-character message, including one blank. Move the viewing window one character at a time, keeping the digits in their left-to-right order.
Draw the window
Copy the message dE1-SoC followed by a blank into eight boxes. Mark the six characters visible when the first box is at the left of the display. Shift the window by one box. At which starting index will your six-character window first cross the end of the array?
Build and observe
In CPUlator choose C in Language, open main.c with File → Open, then choose Compile and Load (F5) and Continue (F3). Read the six rightmost digits in Seven-segment displays. The starter repeatedly draws the first window.
Find where show selects a character for each column. Include the starting index in the lookup and wrap it at the length of the message. Keep the two high digits and the four low digits in the registers already supplied. Rebuild and follow an entire turn.
| First character index | Six characters, including blanks | Observation |
|---|---|---|
| 0 | ||
| 1 | ||
| 6 | ||
| 7 | ||
| Back to 0 |
Press and release KEY0 to freeze a window. After at least one second, check all six positions again. Press and release KEY3 to resume. Submit your table and the time between identical windows. Predict what happens to that period if you halve TICKS_PER_UPDATE, then try it.
Original LabsLand activity following FPGAcademy Computer Organization Lab 6, Part V. FPGAcademy PDF · MIT
