Pin map
loc Logisim storesPorts as a table
| # | Port | Direction | Width | Offset from anchor |
|---|---|---|---|---|
| 1 | Segment A | in | 1 | (20, 0) |
| 2 | Segment B | in | 1 | (30, 0) |
| 3 | Segment C | in | 1 | (20, 60) |
| 4 | Segment D | in | 1 | (10, 60) |
| 5 | Segment E | in | 1 | (0, 60) |
| 6 | Segment F | in | 1 | (10, 0) |
| 7 | Segment G | in | 1 | (0, 0) |
| 8 | Decimal point | in | 1 | (30, 60) |
| Position | Segment | Port at (x, y) |
|---|---|---|
| Top, 1st | g | (0, 0) |
| Top, 2nd | f | (10, 0) |
| Top, 3rd | a | (20, 0) |
| Top, 4th | b | (30, 0) |
| Bottom, 1st | e | (0, 60) |
| Bottom, 2nd | d | (10, 60) |
| Bottom, 3rd | c | (20, 60) |
| Bottom, 4th | decimal point | (30, 60) |
The tooltips 5.0.0 shows are Segment A to Segment G and Decimal point. A 1 lights a segment. We did not test the Active On High? attribute that reverses this.
Fastest: the Hex Digit Display
The Hex Digit Display has one 4-bit data input and a decimal-point input. It shows 0 to F.
Logisim-evolution 5.0.0 with a 4-bit input pin N reading 1011 wired to a Hex Digit Display. The display shows the letter b in red segments.
Drive a 7-segment display from a number
Built-in decoder
The BFH mega functions library has a BCD to seven segment decoder. Its seven outputs sit at the same positions as the display’s a to g inputs, and it has no decimal-point output.
| # | N | a | b | c | d | e | f | g |
|---|---|---|---|---|---|---|---|---|
| 0000 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | |
| 0001 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | |
| 0010 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | |
| 0011 | 1 | 1 | 1 | 1 | 0 | 0 | 1 | |
| 0100 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | |
| 0101 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | |
| 0110 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | |
| 0111 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | |
| 1000 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | |
| 1001 | 1 | 1 | 1 | 1 | 0 | 1 | 1 | |
| 1010 | U | U | U | U | U | U | U | |
| 1011 | U | U | U | U | U | U | U | |
| 1100 | U | U | U | U | U | U | U | |
| 1101 | U | U | U | U | U | U | U | |
| 1110 | U | U | U | U | U | U | U | |
| 1111 | U | U | U | U | U | U | U |
Download circ-7seg-bcd-builtin.circ. A TTL 7447 is the chip-level equivalent (TTL 7400 series).
ROM lookup
A 16-word ROM holds the segment bits. We use bit 0 = a, bit 6 = g and bit 7 = decimal point. A splitter fans the ROM word out to the display pins.
| # | N | Segment word |
|---|---|---|
| 0x0 | 0x3f | |
| 0x1 | 0x6 | |
| 0x2 | 0x5b | |
| 0x3 | 0x4f | |
| 0x4 | 0x66 | |
| 0x5 | 0x6d | |
| 0x6 | 0x7d | |
| 0x7 | 0x7 | |
| 0x8 | 0x7f | |
| 0x9 | 0x6f | |
| 0xa | 0x77 | |
| 0xb | 0x7c | |
| 0xc | 0x39 | |
| 0xd | 0x5e | |
| 0xe | 0x79 | |
| 0xf | 0x71 |
Logisim-evolution 5.0.0 with a 16 by 8 ROM driving a 7-segment display through a splitter. The input reads 0000, the ROM output reads 00111111 and the display shows a zero.
Describe this circuit
Components: Input pin N; ROM table; Output pin W; Splitter 1; 7-Segment Display 1.
- Input pin N connects to ROM table (net N, n), 8 bits wide.
- ROM table connects to Output pin W, Splitter 1 (net w, W), 8 bits wide.
- Splitter 1 connects to 7-Segment Display 1 (net e0).
- Splitter 1 connects to 7-Segment Display 1 (net e1).
- Splitter 1 connects to 7-Segment Display 1 (net e2).
- Splitter 1 connects to 7-Segment Display 1 (net e3).
- Splitter 1 connects to 7-Segment Display 1 (net e4).
- Splitter 1 connects to 7-Segment Display 1 (net e5).
- Splitter 1 connects to 7-Segment Display 1 (net e6).
- Splitter 1 connects to 7-Segment Display 1 (net e7).
Download circ-7seg-rom-decoder.circ. To make the contents for your own bit order, use the memory image generator. We did not test a gate-level decoder for this page; see Combinational Analysis.
Common anode, common cathode and Active On High?
Logisim has no anode or cathode pin. The Active On High? attribute is for the same job: untick it if your decoder outputs 0 for a lit segment, as a 7447 does. We did not test both settings.
Two, three or more digits
Split the value into digits before the displays. The BFH library has a Binary to BCD part with a 9-bit input and three 4-bit outputs for units, tens and hundreds (port names, F44). We did not test it. For a counting clock see Digital clock.
Version differences
| Feature | 2.7.1 | 5.0.0 |
|---|---|---|
| Display port positions | 2.7.1: yessame positions in our port data | 5.0.0: yesa (20,0) ... dp (30,60) |
| Hex Digit Display decimal-point port | 2.7.1: partialat (10,0) in our port data | 5.0.0: partialat (20,0) |
| BFH BCD to seven segment decoder | 2.7.1: nonot in 2.7.1 | 5.0.0: yestested (F89) |
See also all components.
On a real board the display is mapped in the FPGA guide window.