Skip to content

Activity 2.3.2 — Seven-Segment Display


Learning Objectives

By the end of this lesson, students will be able to:

  1. Identify the seven segments of a seven-segment display and explain the difference between common cathode and common anode configurations.
  2. Determine which segments must be illuminated to display digits 0-9 and letters A-F using BCD input.
  3. Explain the function of the 7447 BCD-to-7-segment decoder/driver IC and wire a display circuit with current-limiting resistors.

Vocabulary

Vocabulary (click to expand)
Term Definition
Seven-Segment Display An electronic display device used to show decimal digits (0-9) by illuminating combinations of seven LED segments.
BCD (Binary Coded Decimal) A 4-bit binary representation where each decimal digit (0-9) is represented by its equivalent 4-bit binary code.
Common Cathode A configuration where all LED cathodes are connected to a common ground node; segments light with a HIGH input.
Common Anode A configuration where all LED anodes are connected to a common VCC node; segments light with a LOW input.
Segment One of the seven illuminated bars (a-g) plus the decimal point (dp) that make up a seven-segment display.
Current-Limiting Resistor A resistor placed in series with each LED segment to limit current and prevent damage to the display.

Part 1: Anatomy of a Seven-Segment Display

A seven-segment display is a fundamental output device in digital electronics that uses seven LED segments arranged in a figure-8 pattern. Each segment is labeled with a letter from a through g, with an optional decimal point (dp).

Segment Layout

  a
f   b
  g
e   c
  d   dp
  • Segments a, b, c, d, e, f, g: The seven main segments that form the digits
  • Decimal point (dp): Optional eighth segment for displaying decimal points

Common Cathode vs Common Anode

There are two ways to wire the LEDs inside a seven-segment display:

Configuration Description Logic Required to Light Segment
Common Cathode All LED cathodes are connected together to GND HIGH (1) turns segment ON
Common Anode All LED anodes are connected together to VCC LOW (0) turns segment ON

In this course, we will primarily use common cathode displays, where applying a HIGH voltage to a segment illuminates it.


Part 2: Displaying Digits 0-9

To display each digit, specific segments must be illuminated. The table below shows which segments are ON (1) or OFF (0) for each digit using a common cathode display.

Digit Patterns

Digit a b c d e f g Display
0 1 1 1 1 1 1 0 0
1 0 1 1 0 0 0 0 1
2 1 1 0 1 1 0 1 2
3 1 1 1 1 0 0 1 3
4 0 1 1 0 0 1 1 4
5 1 0 1 1 0 1 1 5
6 1 0 1 1 1 1 1 6
7 1 1 1 0 0 0 0 7
8 1 1 1 1 1 1 1 8
9 1 1 1 1 0 1 1 9

Key insight: Notice that digit 8 illuminates ALL segments. Digit 1 requires only segments b and c. The segments light in a pattern that forms the familiar digit shapes.


Part 3: BCD Input and the 7447 Decoder

Binary Coded Decimal (BCD)

BCD is a way to represent decimal digits (0-9) using 4 binary bits. While a 4-bit number can represent values 0-15, BCD only uses the values 0-9 and ignores the patterns for 10-15.

Decimal BCD (D C B A)
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001

The 7447 BCD-to-7-Segment Decoder/Driver

The 7447 IC is a decoder/driver that takes a 4-bit BCD input and produces the appropriate outputs to drive a common anode seven-segment display. Key features:

  • Inputs: A, B, C, D (where D is the MSB)
  • Outputs: a, b, c, d, e, f, g (active LOW for common anode displays)
  • Lamp Test: When LOW, all segments illuminate
  • Ripple Blanking: When HIGH, blank leading zeros

Wiring a Seven-Segment Display

When connecting a seven-segment display:

  1. Current-limiting resistors (typically 330 ohms) must be placed in series with each segment to limit current and prevent LED damage.
  2. For common cathode displays, connect the common pin to GND.
  3. Connect each segment output through a resistor to the segment pins (a-g).
VCC ----[330]---a---|\
                       |  (segment a)
VCC ----[330]---b---|/

Key insight: Without current-limiting resistors, too much current would flow through the LEDs, potentially destroying the display. The 330 ohm value is common for 5V systems, but always check the display specifications.


Practice Problem — BCD-to-7-Segment Patterns

Problem 1: Determine which segments are illuminated to display the digit "4".

Problem 2: What BCD input (D C B A) produces the digit "7"?

Problem 3: For a common cathode display, what logic level (HIGH or LOW) must be applied to segment f to display the digit "2"?

Show Solution

Problem 1 Solution: Looking at the table, digit 4 requires segments b, c, f, and g to be ON. Result: Segments b, c, f, g = ON; Segments a, d, e = OFF

Problem 2 Solution: BCD for 7 = 0111 (D=0, C=1, B=1, A=1)

Problem 3 Solution: For digit 2, segment f is OFF. In common cathode, OFF = LOW. Result: LOW (0)


Practice Problem — Hexadecimal Display (A-F)

Problem: Seven-segment displays can also show letters for hexadecimal (base-16) representation. Determine which segments to illuminate for:

a) Letter "A" (uppercase)
b) Letter "b" (lowercase, shows as 'b' to distinguish from digit 8)
c) Letter "C" (uppercase)
d) Letter "F" (uppercase)

Show Solution
a) "A": segments a, b, c, e, f, g (and optionally dp)
b) "b": segments c, d, e, f, g
c) "C": segments a, d, e, f
d) "F": segments a, e, f, g

Note: Some letters look similar when displayed (like 'b' and '6', 'O' and '0'). Lowercase letters are often used to distinguish them.


Summary

  • A seven-segment display consists of seven LED segments (a-g) plus an optional decimal point.
  • Common cathode displays require HIGH inputs to light segments; common anode requires LOW inputs.
  • BCD uses 4 bits to represent decimal digits 0-9.
  • The 7447 decoder converts BCD input to the proper segment patterns for a common anode display.
  • Current-limiting resistors are essential to protect the LEDs from excessive current.
  • Seven-segment displays can also show letters A-F for hexadecimal applications.

Key Reminders

  • Always use current-limiting resistors (typically 330 ohm) when wiring LED segments.
  • Remember the segment labeling convention: a is top, b is upper right, c is lower right, d is bottom, e is lower left, f is upper left, g is middle.
  • BCD only uses patterns 0000-1001; patterns 1010-1111 are not valid decimal digits.
  • The 7447 produces active LOW outputs for use with common anode displays.

Custom activity — adapted from PLTW Digital Electronics