Introduction: 7 Segment Display With Arduino

About: pursuing Bachelors in Electronics and Communication at Chandigarh University

You will find code and circuit diagram for both common cathode and common anode seven segment displays in this article.

7 segment displays don’t look modern enough for you, but they are the most practical way to display numbers. They are easy to use, cost-effective and highly readable, both in limited light conditions and in strong sunlight.

In this project, we will display numbers from 0 to 9 as it is a single 7 segment display we can display only one digit at a time.

Components Required

  1. Arduino - https://amzn.to/32jAMUA
  2. 7 segment display - https://amzn.to/35p4wS5
  3. Breadboard - https://amzn.to/3kdp4Rt
  4. jumper wires - https://amzn.to/3iqdBxM
  5. 8 X resistors of 220 ohms - https://amzn.to/2ZuPNRN

Resistance is important to apply otherwise display can burn after a few minutes.

Step 1: Circuit Schematic of Common Cathode

Pin 12 - - > a TERMINAL OF 7 SEG

Pin 11 - - > b TERMINAL OF 7 SEG

Pin 10 - - > dp TERMINAL OF 7 SEG

Pin 9 - - > c TERMINAL OF 7 SEG

Pin 8 - - > d TERMINAL OF 7 SEG

Pin 7 - - > e TERMINAL OF 7 SEG

Pin 6 - - > g TERMINAL OF 7 SEG

Pin 5 - - > f TERMINAL OF 7 SEG

GND - - > - TERMINAL OF 7 SEG

Step 2: Circuit Schematic of Common Anode

Pin 12 - - > a TERMINAL OF 7 SEG

Pin 11 - - > b TERMINAL OF 7 SEG

Pin 10 - - > dp TERMINAL OF 7 SEG

Pin 9 - - > c TERMINAL OF 7 SEG

Pin 8 - - > d TERMINAL OF 7 SEG

Pin 7 - - > e TERMINAL OF 7 SEG

Pin 6 - - > g TERMINAL OF 7 SEG

Pin 5 - - > f TERMINAL OF 7 SEG

5V - - > - TERMINAL OF 7 SEG

Step 3: Arduino Code

Code for common anode is exact opposite of common cathode 7 segment display