Lab 1

Draw three characters with seven segments

Digital Logic · Lab 1, Part IV · DE1-SoC

Your circuit translates a two-bit code into a character on HEX0. On this display a low pin lights its segment. You will derive a Boolean expression for each pin and check the characters on a real display.

Lab setup

Physical DE1-SoCCyclone V · 5CSEMA5F31C6 · camera, switches and buttons in the browser

  1. Get the starterDownload letter_decoder.v
  2. Open the LabsLand Online EditorOpen the lab LabsLand asks you to sign in. Use the access your course or institution provides.
  3. Follow the worksheetPredict first, then build, read the board and hand in. The build steps are below.

Starter files · Verilog · VHDL · SystemVerilog

Map the segments

Number the segments clockwise from the top. Segment 0 is the top bar, 1 the upper right, 2 the lower right, 3 the bottom, 4 the lower left and 5 the upper left. Segment 6 is the center. Sketch the lowercase d, capital E and digit 1 with these bars. For d, leave both the top and upper-left bars dark.

SW1 SW0 Character Segments lit Pin levels 6…0
00 d
01 E
10 1
11 blank

Read one column of your seven pin levels at a time. Which two input codes turn off the center bar? Find an expression for that pin, then do the other six.

Build

Create letter_decoder in your HDL editor, choose it as the top-level file and paste the starter. Its logic for segment 0 is supplied. Implement the other six pins as Boolean expressions. Choose Standard, synthesize and upload.

Read the board

Change SW1 and SW0 through the four codes and read HEX0 in the board camera. With E showing, flip SW2. Explain why the character should stay the same.

Hand in

Submit the table, one derivation and the four observed characters. If the blank code lights every segment, identify the convention your equations have reversed.

Adapted from FPGAcademy Digital Logic 21.1, Lab 1, Part IV. LabsLand wrote the remote exercise and HDL. Original Verilog handout · Original VHDL handout · MIT notice