Scrolling text
The display is only four characters wide, so longer text has to move. Keep the message HELLO (with a space) as six segment patterns and show four of them, starting one further along every quarter second, wrapping round at the end.
This time you drive the segments yourself: seg3 is the leftmost digit and seg0 the rightmost, each [6:0] with bit 0 the top segment (a). H is 7'h76, E 7'h79, L 7'h38, O 7'h3F.
lab.v
drag to turn · scroll to zoom
Loading the board…
Press Run on the board: your Verilog is turned into gates in this browser and runs here, cycle by cycle.
Goals
- ○It shows HELL, then ELLO, LLO␣, …
- ○It moves on every 0.25 s and wraps around
Hints
- A position counter 0–5 and a function
glyph(i)returning the pattern for letteriof the message. seg3 = glyph(pos),seg2 = glyph(pos + 1 mod 6), and so on.
Pin log
Run the design to see its outputs change.
Put it on a real board
- The Sipeed Tang Nano 9K (Gowin GW1NR-9) has no a 7-segment display: those ports go to header pins, where you can wire them.
- The clock is set to the board's 27 MHz, and its active-low buttons and LEDs are flipped for you.