7-segment shows the wrong shapes, or everything inverted

  • 7-segment display

Why it happens

  • Common anode and common cathode are mixed up.
  • Two segment wires are swapped.

How to fix it

  1. Light one segment at a time (a, b, c…) and check it's the right bar.
  2. Common anode: COM to 5V and LOW turns a bar on. Common cathode: COM to GND and HIGH turns it on.
  3. With SevSeg, change COMMON_CATHODE to COMMON_ANODE.
  4. Keep a resistor for every segment.

It worked if: The digit 8 lights all seven bars.

From how the part works. Explained from how the part works; not tried on a real circuit for this page.

Didn't help? Search another error or ask us.