How To Interface A Seven-Segment Display With An Arduino - Digikey

  • Products Back
    • New Products
    • Automation & Control Back
      • Accessories
      • Controllers - Accessories
      • Controllers - PLC Modules
      • Controllers - Process, Temperature
      • Controllers - Programmable Logic (PLC)
      • Human Machine Interface (HMI)
      • Industrial Equipment
      • Machine Vision - Cameras/Sensors
      • Monitor - Current/Voltage Transducer
      • Panel Meters
      • Panel Meters - Counters, Hour Meters
      • Pneumatics, Hydraulics
      • Time Delay Relays
      • See All
      • Machine Safety - Light Curtains
    • Cables, Wires Back
      • Cable Assemblies Back
        • Barrel - Power Cables
        • Between Series Adapter Cables
        • Circular Cable Assemblies
        • Coaxial Cables (RF)
        • D-Shaped, Centronics Cables
        • D-Sub Cables
        • Flat Flex Cables (FFC, FPC)
        • Flat Flex, Ribbon Jumper Cables
        • Jumper Wires, Pre-Crimped Leads
        • Modular Cables
        • Pluggable Cables
        • Power, Line Cables and Extension Cords
        • Rectangular Cable Assemblies
        • USB Cables
        • See All
      • Cables, Wires - Management Back
        • Accessories
        • Bushings, Grommets
        • Cable and Cord Grips
        • Cable Supports and Fasteners
        • Cable Ties - Holders and Mountings
        • Cable Ties and Cable Lacing
        • Grounding Braid, Straps
        • Heat Shrink Boots, Caps
        • Heat Shrink Tubing
        • Labels, Labeling
        • Protective Hoses, Solid Tubing, Sleeving
        • Solder Sleeve
        • Spiral Wrap, Expandable Sleeving
        • Wire Ducts, Raceways
        • See All
      • Coaxial Cables (RF)
      • Fiber Optic Cables
      • Flat Flex Cables (FFC, FPC)
      • Flat Ribbon Cables
      • Modular - Flat Cable
      • Multiple Conductor Cables
      • Single Conductor Cables (Hook-Up Wire)
      • Wire Wrap
      • See All
      • Multiple Conductor Cables
    • Circuit Protection Back
      • Accessories
      • Circuit Breakers
      • Electrical, Specialty Fuses
      • Fuseholders
      • Fuses
      • Gas Discharge Tube Arresters (GDT)
      • Inrush Current Limiters (ICL)
      • PTC Resettable Fuses
      • Surge Suppression ICs
      • Thermal Cutoffs (Thermal Fuses)
      • TVS - Diodes
      • TVS - Mixed Technology
      • TVS - Thyristors
      • TVS - Varistors, MOVs
      • Fuses
    • Connectors Back
      • Backplane Connectors Back
        • Accessories
        • ARINC Inserts
        • ARINC
        • Contacts
        • DIN 41612
        • Hard Metric, Standard
        • Housings
        • Specialized
        • See All
      • Barrel Connectors Back
        • Accessories
        • Adapters
        • Audio Connectors
        • Power Connectors
        • See All
      • Circular Connectors Back
        • Accessories
        • Adapters
        • Backshells and Cable Clamps
        • Circular Connectors
        • Contacts
        • Housings
        • See All
      • Coaxial Connectors (RF) Back
        • Accessories
        • Adapters
        • Connectors
        • Contacts
        • Terminators
        • See All
      • D-Sub, D-Shaped Connectors Back
        • Accessories
        • Accessories - Jackscrews
        • Adapters
        • Backshells, Hoods
        • Contacts
        • D-Sub Connectors
        • Housings
        • Terminators
        • See All
      • FFC, FPC (Flat Flexible) Connectors Back
        • Accessories
        • Contacts
        • FFC, FPC (Flat Flexible) Connectors
        • Housings
      • Modular Connectors Back
        • Accesories
        • Adapters
        • Inline Module Sockets
        • Jacks
        • Jacks With Magnetics
        • PC Card Sockets
        • PC Cards - Adapters
        • Plug Housings
        • Plugs
        • Wiring Blocks
        • Wiring Blocks - Accessories
        • See All
      • Power Entry Connectors Back
        • Accessories
        • Inlets, Outlets, Modules
      • Rectangular Connectors Back
        • Accessories
        • Adapters
        • Arrays, Edge Type, Mezzanine (Board to Board)
        • Board In, Direct Wire to Board
        • Board Spacers, Stackers (Board to Board)
        • Contacts
        • Free Hanging, Panel Mount
        • Headers, Male Pins
        • Headers, Receptacles, Female Sockets
        • Headers, Specialty Pin
        • Housings
        • Spring Loaded
        • See All
      • Terminal Blocks Back
        • Accessories
        • Adapters
        • Barrier Blocks
        • Contacts
        • Din Rail, Channel
        • Headers, Plugs and Sockets
        • Interface Modules
        • Panel Mount
        • Power Distribution
        • Specialized
        • Wire to Board
      • Terminals Back
        • Barrel, Bullet Connectors
        • Housing, Boots
        • PC Pin Receptacles, Socket Connectors
        • PC Pin, Single Post Connectors
        • Quick Connects, Quick Disconnect Connectors
        • Rectangular Connectors
        • Ring Connectors
        • Screw Connectors
        • Spade Connectors
        • Specialized Connectors
        • Turret Connectors
        • Wire Splice Connectors
      • USB, DVI, HDMI Connectors Back
        • Accessories
        • Adapters
        • Connectors
      • See All
      • Rectangular Connectors - Headers, Male Pins
    • Electromechanical Back
      • Audio Products Back
        • Accessories
        • Alarms, Buzzers, and Sirens
        • Buzzer Elements, Piezo Benders
        • Microphones
        • Speakers
      • Motors, Solenoids, Driver Boards/Modules Back
        • Accessories
        • Motor Driver Boards, Modules
        • Motors - AC, DC
        • Solenoids, Actuators
        • Stepper Motors
      • Relays Back
        • Accessories
        • Automotive Relays
        • Contactors (Electromechanical)
        • Contactors (Solid State)
        • High Frequency (RF) Relays
        • I/O Relay Module Racks
        • I/O Relay Modules
        • Power Relays, Over 2 Amps
        • Reed Relays
        • Relay Sockets
        • Signal Relays, Up to 2 Amps
        • Solid State Relays
      • Switches Back
        • Accessories
        • Accessories - Caps
        • DIP Switches
        • Keylock Switches
        • Magnetic, Reed Switches
        • Navigation Switches, Joystick
        • Pushbutton Switches
        • Rocker Switches
        • Rotary Switches
        • Selector Switches
        • Slide Switches
        • Snap Action, Limit Switches
        • Tactile Switches
        • Toggle Switches
      • Tactile Switches
    • Enclosures, Hardware, Office Back
      • Boxes, Enclosures, Racks Back
        • Backplanes
        • Box Accessories
        • Box Components
        • Boxes
        • Cams
        • Card Guide Accessories
        • Card Guides
        • Card Rack Accessories
        • Card Racks
        • Evaluation, Development Board Enclosures
        • Handles
        • Patchbay, Jack Panels
        • Rack Accessories
        • Rack Components
        • Racks
        • See All
      • Computer Equipment Back
        • Accessories
        • Adapter Cards
        • Adapters, Converters
        • Brackets
        • Cameras, Projectors
        • Computer Mouse, Trackballs
        • Keyboards
        • KVM Switches (Keyboard Video Mouse)
        • KVM Switches (Keyboard Video Mouse) - Cables
        • Magnetic Strip, Smart Card Readers
        • Memory Card Readers
        • Printers, Label Makers
        • See All
      • Hardware, Fasteners, Accessories Back
        • Accessories
        • Board Spacers, Standoffs
        • Board Supports
        • Bumpers, Feet, Pads, Grips
        • Clips, Hangers, Hooks
        • Component Insulators, Mounts, Spacers
        • DIN Rail Channel
        • Hole Plugs
        • Knobs
        • Mounting Brackets
        • Nuts
        • Rivets
        • Screws, Bolts
        • Washers
        • Washers - Bushing, Shoulder
        • See All
      • Memory Cards, Modules Back
        • Accessories
        • Memory - Modules
        • Memory Cards
        • Solid State Drives (SSDs)
        • Specialized
        • USB Flash Drives
      • Networking Solutions Back
        • Accessories
        • Gateways, Routers
        • Media Converters
        • Miscellaneous
        • Serial Device Servers
        • Switches, Hubs
      • Boxes
    • Fans, Thermal Management Back
      • AC Fans
      • DC Fans
      • Fans - Accessories
      • Fans - Accessories - Fan Cords
      • Fans - Finger Guards, Filters & Sleeves
      • Thermal - Accessories
      • Thermal - Adhesives, Epoxies, Greases, Pastes
      • Thermal - Heat Pipes, Vapor Chambers
      • Thermal - Heat Sinks
      • Thermal - Liquid Cooling
      • Thermal - Pads, Sheets
      • Thermal - Thermoelectric, Peltier Assemblies
      • Thermal - Thermoelectric, Peltier Modules
      • Thermal - Pads, Sheets
    • Integrated Circuits (ICs) Back
      • Audio Special Purpose
      • Clock/Timing
      • Data Acquisition
      • Embedded
      • Integrated Circuits (ICs) Kits
      • Interface
      • Linear
      • Logic
      • Memory
      • Power Management (PMIC)
      • Specialized ICs
      • Embedded
    • LED/Optoelectronics Back
      • Display Modules - LCD, OLED Character and Numeric
      • Display Modules - LCD, OLED, Graphic
      • Display Modules - LED Character and Numeric
      • Fiber Optics - Transceiver Modules
      • Infrared, UV, Visible Emitters
      • Laser Diodes, Modules
      • LED Indication - Discrete
      • LED Lighting - COBs, Engines, Modules, Strips
      • LED Lighting - Color
      • LED Lighting - White
      • Optics - Light Pipes
      • Panel Indicators, Pilot Lights
      • See All
      • LED Lighting - White
    • Passives Back
      • Capacitors Back
        • Aluminum Electrolytic Capacitors
        • Aluminum - Polymer Capacitors
        • Capacitor Networks, Arrays
        • Ceramic Capacitors
        • Electric Double Layer Capacitors (EDLC), Supercapacitors
        • Film Capacitors
        • Mica and PTFE Capacitors
        • Silicon Capacitors
        • Tantalum Capacitors
        • Tantalum - Polymer Capacitors
        • Thin Film Capacitors
        • Trimmers, Variable Capacitors
      • Crystals
      • Filters
      • Inductors, Coils, Chokes Back
        • Adjustable Inductors
        • Arrays, Signal Transformers
        • Delay Lines
        • Fixed Inductors
        • Wireless Charging Coils
      • Magnetics - Transformer, Inductor Components Back
        • Bobbins (Coil Formers), Mounts, Hardware
        • Ferrite Cores
        • Magnetic Wire
      • Oscillators Back
        • Oscillators
        • Pin Configurable/Selectable Oscillators
        • Programmable Oscillators
        • Sockets and Insulators
        • Stand Alone Programmers
        • VCOs (Voltage Controlled Oscillators)
      • Potentiometers, Variable Resistors Back
        • Accessories
        • Adjustable Power Resistor
        • Rotary Potentiometers, Rheostats
        • Scale Dials
        • Slide Potentiometers
        • Thumbwheel Potentiometers
        • Trimmer Potentiometers
        • Value Display Potentiometers
      • Resistors Back
        • Accessories
        • Chassis Mount Resistors
        • Chip Resistor - Surface Mount
        • Resistor Networks, Arrays
        • Specialized Resistors
        • Through Hole Resistors
      • Resonators
      • Capacitors
    • Power Back
      • Battery Products Back
        • Accessories
        • Batteries Non-Rechargeable (Primary)
        • Batteries Rechargeable (Secondary)
        • Battery Chargers
        • Battery Holders, Clips, Contacts
        • Battery Packs
        • Cigarette Lighter Assemblies
      • Power Supplies Back
        • AC AC Wall Adapters
        • Accessories
        • AC DC Configurable Power Supplies (Factory Assembled)
        • AC DC Configurable Power Supply Chassis
        • AC DC Configurable Power Supply Modules
        • AC DC Converters
        • AC DC Desktop, Wall Adapters
        • DC DC Converters
        • LED Drivers
        • Power over Ethernet (PoE)
      • Solar Cells
      • Transformers Back
        • Accessories
        • Audio Transformers
        • Bobbins (Coil Formers) Mounts, Hardware
        • Current Sense Transformers
        • Ferrite Cores
        • Isolation Transformers and Autotransformers, Step Up, Step Down
        • Magnetic Wire
        • Power Transformers
        • Pulse Transformers
        • Specialty Transformers
        • Switching Converter SMPS Transformers
      • DC DC Converters
    • RF and Wireless Back
      • Balun
      • RF Amplifiers
      • RF Antennas
      • RF Detectors
      • RF Directional Coupler
      • RF Evaluation and Development Kits, Boards
      • RF Mixers
      • RF Receiver, Transmitter, and Transceiver Finished Units
      • RF Shields
      • RF Switches
      • RF Transceiver ICs
      • RF Transceiver Modules
      • See All
      • RF Receiver, Transmitter, and Transceiver Finished Units
    • Semiconductors Back
      • Development Boards, Kits, Programmers Back
        • Accessories
        • Evaluation and Demonstration Boards and Kits
        • Evaluation Boards - Analog to Digital Converters (ADCs)
        • Evaluation Boards - Embedded - Complex Logic (FPGA, CPLD)
        • Evaluation Boards - Embedded - MCU, DSP
        • Evaluation Boards - Expansion Boards, Daughter Cards
        • Evaluation Boards - LED Drivers
        • Evaluation Boards - Op Amps
        • Evaluation Boards - Sensors
        • Programmers, Emulators, and Debuggers
        • See All
      • Discrete Back
        • Diodes - Bridge Rectifiers
        • Diodes - Rectifiers - Arrays
        • Diodes - Rectifiers - Single
        • Diodes - RF
        • Diodes - Zener - Single
        • Thyristors - SCRs
        • Thyristors - TRIACs
        • Transistors - Bipolar (BJT) - Arrays
        • Transistors - Bipolar (BJT) - RF
        • Transistors - Bipolar (BJT) Single
        • Transistors - FETs, MOSFETs - Arrays
        • Transistors - FETs, MOSFETs - Single
        • Transistors - IGBTs - Single
        • Transistors - JFETs
        • See All
      • Embedded Computers Back
        • Accessories
        • Interface Boards
        • Single Board Computers (SBCs)
      • Integrated Circuits (ICs) Back
        • Audio Special Purpose
        • Clock/Timing
        • Data Acquisition
        • Embedded
        • Interface
        • Linear
        • Logic
        • Memory
        • PMIC
        • Specialized ICs
        • See All
      • Isolators Back
        • Digital Isolators
        • Isolators - Gate Drivers
        • Optoisolators - Logic Output
        • Optoisolators - Transistor, Photovoltaic Output
        • Optoisolators - Triac, SCR Output
        • Special Purpose
      • Embedded - Microcontrollers
    • Sensors, Transducers Back
      • Current Sensors
      • Encoders
      • Humidity, Moisture Sensors
      • Image Sensors, Camera
      • Magnetic Sensors - Linear, Compass (ICs)
      • Motion Sensors - Accelerometers
      • Optical Sensors - Ambient Light, IR, UV Sensors
      • Optical Sensors - Photodiodes
      • Position Sensors - Angle, Linear Position Measuring
      • Pressure Sensors, Transducers
      • Temperature Sensors - Analog and Digital Output
      • Temperature Sensors - NTC Thermistors
      • See All
      • Pressure Sensors, Transducers
    • Test and Measurement Back
      • Accessories
      • Equipment - Multimeters
      • Equipment - Oscilloscopes
      • Equipment - Power Supplies (Test, Bench)
      • Equipment - Specialty
      • Test Clips - Alligator, Crocodile, Heavy Duty
      • Test Clips - Grabbers, Hooks
      • Test Leads - Banana, Meter Interface
      • Test Leads - BNC Interface
      • Test Leads - Jumper, Specialty
      • Test Leads - Oscilloscope Probes
      • Test Points
      • Test Probe Tips
      • See All
      • Data Acquisition (DAQ)
    • Tools Back
      • Crimpers - Crimp Heads, Die Sets
      • Crimpers, Applicators, Presses
      • Excavators, Hooks, Picks, Probes, Tuning Tools
      • Insertion, Extraction
      • Optical Inspection Equipment Back
        • Accessories
        • Arms, Mounts, Stands
        • Cameras
        • Eyepieces, Lenses
        • Illumination Sources
        • Lamps - Magnifying, Task
        • Loupes, Magnifiers
        • Microscopes
        • Video Inspection Systems
      • Prototyping, Fabrication Products Back
        • Accessories
        • Adapter, Breakout Boards
        • Card Extenders
        • Coating, Grease, Repair
        • Drill Bits, End Mills
        • Etching and Fabrication Equipment
        • Jumper Wire
        • PCB Routers, Milling Machines
        • Prototype Boards Perforated
        • Prototype Boards Unperforated
        • Solderless Breadboards
      • Screw and Nut Drivers
      • Screw and Nut Drivers - Sets
      • Soldering, Desoldering, Rework Products Back
        • Accessories
        • Desoldering Braid, Wick, Pumps
        • Dispensers, Dispenser Tips
        • Flux, Flux Remover
        • Fume, Smoke Extraction
        • Holders, Stands
        • Solder
        • Solder Sponges, Tip Cleaners
        • Solder Stencils, Templates
        • Soldering Irons, Tweezers, Handles
        • Soldering, Desoldering, Rework Stations
        • Soldering, Desoldering, Rework Tips, Nozzles
      • Static Control, ESD, Clean Room Products Back
        • Accessories
        • Clean Room Swabs and Brushes
        • Clean Room Treatments, Cleaners, Wipes
        • Ionizer Equipment
        • Monitors, Testers
        • Static Control Clothing
        • Static Control Device Containers
        • Static Control Grounding Cords, Straps
        • Static Control Grounding Mats
        • Static Control Shielding Bags, Materials
      • Specialized Tools
      • Tweezers
      • Wire Cutters
      • Wire Strippers and Accessories
      • See All
      • Screw and Nut Drivers - Bits, Blades and Handles
    • See All
  • Manufacturers Back
    • Brands A-Z
    • Featured Brands
    • Analog Devices Inc Back
      • Circuit Protection
      • Discrete Semiconductor Products
      • Integrated Circuits (ICs)
      • Isolators
      • Power Supplies - Board Mount
      • RF/IF and RFID
      • Sensors, Transducers
      • Test and Measurement
      • View All
    • Belden Back
      • Boxes, Enclosures, Racks
      • Cable Assemblies
      • Cables, Wires
      • Cables, Wires - Management
      • Connectors, Interconnects
      • Magnetics - Transformer, Inductor Components
      • View All
    • Diodes Incorporated Back
      • Circuit Protection
      • Crystals, Oscillators, Resonators
      • Development Boards, Kits, Programmers
      • Discrete Semiconductor Products
      • Integrated Circuits (ICs)
      • RF/IF and RFID
      • Sensors, Transducers
      • View All
    • Murata Electronics Back
      • Audio Products
      • Capacitors
      • Connectors, Interconnects
      • Crystals, Oscillators, Resonators
      • Filters
      • Inductors, Coils, Chokes
      • RF/IF and RFID
      • Sensors, Transducers
      • View All
    • NXP Semiconductors Back
      • Circuit Protection
      • Development Boards, Kits, Programmers
      • Discrete Semiconductor Products
      • Integrated Circuits (ICs)
      • Optoelectronics
      • RF/IF and RFID
      • Sensors, Transducers
      • View All
    • Omron Back
      • Cable Assemblies
      • Connectors, Interconnects
      • Fans, Thermal Management
      • Optoelectronics
      • Relays
      • Sensors, Transducers
      • Switches
      • Tools
      • View All
    • Panduit Back
      • Cable Assemblies
      • Cables, Wires
      • Cables, Wires - Management
      • Connectors, Interconnects
      • Labels, Signs, Barriers, Identification
      • Tools
      • View All
    • Renesas Back
      • Circuit Protection
      • Development Boards, Kits, Programmers
      • Discrete Semiconductor Products
      • Integrated Circuits (ICs)
      • Isolators
      • Power Supplies - Board Mount
      • RF/IF and RFID
      • Sensors, Transducers
      • View All
    • Silicon Labs Back
      • Crystals, Oscillators, Resonators
      • Development Boards, Kits, Programmers
      • Embedded - Microcontrollers
      • Integrated Circuits (ICs)
      • Isolators
      • RF/IF and RFID
      • Sensors, Transducers
      • View All
    • STMicroelectronics Back
      • Audio Products
      • Battery Products
      • Circuit Protection
      • Development Boards, Kits, Programmers
      • Discrete Semiconductor Products
      • Integrated Circuits (ICs)
      • RF/IF and RFID
      • Sensors, Transducers
      • View All
    • TDK Corporation Back
      • Audio Products
      • Capacitors
      • Filters
      • Inductors, Coils, Chokes
      • Optoelectronics
      • RF/IF and RFID
      • Sensors, Transducers
      • Transformers
      • View All
    • TE Connectivity Back
      • Cable Assemblies
      • Cables, Wires - Management
      • Connectors, Interconnects
      • Relays
      • Resistors
      • Sensors, Transducers
      • Switches
      • Tools
      • View All
    • Texas Instruments Back
      • Circuit Protection
      • Development Boards, Kits, Programmers
      • Discrete Semiconductor Products
      • Integrated Circuits (ICs)
      • Isolators
      • Power Supplies - Board Mount
      • RF/IF and RFID
      • Sensors, Transducers
      • View All
    • Vishay Back
      • Capacitors
      • Circuit Protection
      • Discrete Semiconductor Products
      • Inductors, Coils, Chokes
      • Isolators
      • Optoelectronics
      • Resistors
      • Sensors, Transducers
      • View All
    • YAGEO Back
      • Capacitors
      • Circuit Protection
      • Kits
      • Resistors
      • Sensors, Transducers
      • View All
  • Resources Back
    • Bulb Building
    • Content
    • Applications & Technologies
    • Articles & Blogs
    • eMagazines & eBooks
    • Maker.io
    • Product Training Library
    • TechForum
    • Training & Events
    • Video Library
    • Search All
    Back
    • Tools
    • Conversion Calculators
    • Cross Reference
    • EDA & Design Tools
    • PCB Builder
    • Reference Design Library
    • Scheme-it
    Back
    • Programs & Services
    • Academic Program
    • Automation & Control
    • Design & Integration Services
    • Digital Solutions
    • IoT Solutions
    • Marketplace
    • Part Tracing
    • Product Services
    Back
    • Cart Monitor Buying
    • Tools
    • myLists
    • Quotes
    • Products
    • Manufacturers
    Image of DKRed DKRed Image of Scheme-it Scheme-it Image of webinars Webinars Image of TechForum TechForum
  • Request a Quote
resistor Settings Select Your Country/Region Other Options Language English Español Currency USD Update Cancel United States/USD Summary resistor Fast Delivery

DigiKey customers in the United States can select from a range of delivery options, including Ground shipping at $6.99 and 2-Day at $12.99

resistor Payment Types

Credit account for qualified institutions and businesses

Payment in Advance by Wire Transfer

VisaMastercardAmerican ExpressDiscoverPayPalApple PayGoogle Pay

Marketplace Marketplace Product

More Products From Fully Authorized Partners

Average Time to Ship 1-3 Days. Please see product page, cart, and checkout for actual ship speed.

Extra Ship Charges May Apply

For more information visit Help & Support

Maker.io main logo Login Create Maker Profile
  1. Maker.io - Powered by DigiKey
  2. How to Interface a Seven-Segment Display with an Arduino
How to Interface a Seven-Segment Display with an Arduino 4,749 4

2018-02-21 | By All About Circuits

License: See Original Project Arduino

Courtesy of All About Circuits

Often, a more expensive liquid crystal display is not necessary for displaying data in most applications. A seven-segment display is simply sufficient.

Consider using a seven-segment display if your Arduino application solely needs to display numbers. This display has seven LEDs arranged into the number eight. They are both cost-effective and easy to use. The following picture shows a standard seven-segment display.

a standard seven-segment display

There are two types of seven-segment displays: common anode and common cathode. The Internal structure of each of these types is nearly the identical. However, the polarity of the LEDs and common terminal are different. In most standard cathode seven-segment displays (the one we used in the experiments), all seven LEDs, in addition to a dot LED, have the cathodes connected to pins 8 and pin 3. To use this display, we must connect GROUND to pin 3 and pin 8, then connect +5V to the other pins and make each of the individual segments light up. The diagram below shows the internal structure of the common cathode seven-segment display:

internal structure of common cathode display

In contrast, the common anode display is the opposite. In a common anode display, the positive terminal of the eight-shaped LEDs are connected together. They are then connected to pin 3 and pin 8. To turn on an individual segment, one of the pins is grounded. The diagram below shows the internal structure of the common anode seven-segment display.

internal structure of the common anode display

The dot is labeled “dp”, while the the seven segments are labelled a-g, as shown in the figure below:

SSD Configuration

You turn on the individual segments to display a particular number, as seen in the following table:

individual segments to display a particular number

Experiment 1

In this experiment, we will turn LEDs on and off in order to become familiar with how a seven-segment display functions.

Hardware Required

  • 1 x seven-segment display (common cathode)

  • 1 x Arduino MEGA 2560

  • 1 x breadboard

  • jumper wires

Wiring Diagram

In this circuit, the pins of seven-segment display connect to Arduino pins 2-9, as shown in the following table. Pins 8 and 3, the common pins, connect to GND; however, dp is left without a connection. For this experiment, it is not needed.

pins of display are connected to Arduino pins 2-9

Wiring Diagram

Copy Codevoid setup() { // define pin modes pinMode(2,OUTPUT); pinMode(3,OUTPUT); pinMode(4,OUTPUT); pinMode(5,OUTPUT); pinMode(6,OUTPUT); pinMode(7,OUTPUT); pinMode(8,OUTPUT); } void loop() { // loop to turn leds od seven seg ON for(int i=2;i<9;i++) { digitalWrite(i,HIGH); delay(600); } // loop to turn leds od seven seg OFF for(int i=2;i<9;i++) { digitalWrite(i,LOW); delay(600); } delay(1000); }

Experiment 2

Description

In this experiment, we will interface a seven-segment display with Arduino mega. We will learn to display a countdown from nine, with a one-second delay, on the seven-segment display.

Hardware Required

Experiment 1 has the same hardware required as this experiment.

Wiring Diagram

The circuit for Experiment 1 has the same writing diagram as this experiment.

Copy Code// make an array to save Sev Seg pin configuration of numbers int num_array[10][7] = { { 1,1,1,1,1,1,0 }, // 0 { 0,1,1,0,0,0,0 }, // 1 { 1,1,0,1,1,0,1 }, // 2 { 1,1,1,1,0,0,1 }, // 3 { 0,1,1,0,0,1,1 }, // 4 { 1,0,1,1,0,1,1 }, // 5 { 1,0,1,1,1,1,1 }, // 6 { 1,1,1,0,0,0,0 }, // 7 { 1,1,1,1,1,1,1 }, // 8 { 1,1,1,0,0,1,1 }}; // 9 //function header void Num_Write(int); void setup() { // set pin modes pinMode(2, OUTPUT); pinMode(3, OUTPUT); pinMode(4, OUTPUT); pinMode(5, OUTPUT); pinMode(6, OUTPUT); pinMode(7, OUTPUT); pinMode(8, OUTPUT); } void loop() { //counter loop for (int counter = 10; counter > 0; --counter) { delay(1000); Num_Write(counter-1); } delay(3000); } // this functions writes values to the sev seg pins void Num_Write(int number) { int pin= 2; for (int j=0; j < 7; j++) { digitalWrite(pin, num_array[number][j]); pin++; } }

Download the code for this project here.

Mfr Part # LSHD-A101 DISPLAY 7-SEG 0.3" SGL RED 10DIP Lite-On Inc. $1.29 View More Details Mfr Part # A000067 ARDUINO MEGA2560 ATMEGA2560 Arduino $49.90 View More Details Mfr Part # TW-E41-1020 BREADBRD TERM STRP 6.5X2.14 70PC Twin Industries $10.99 View More Details Mfr Part # 153 JUMPER WIRE M TO M VARIOUS Adafruit Industries LLC $4.95 View More Details Add all DigiKey Parts to Cart Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.

Related Content

LED Basics

By bekathwia

LED calculator

By M5Stack

LED Noodle Lamp

By Adafruit Industries

CircuitPython LED Animations

By Adafruit Industries

Creating Custom LED Animations

By Adafruit Industries

13 Ideas for LED Diffusion

By bekathwia

CircuitPython Hardware Charlieplex LED Matrix

By Adafruit Industries

Weather Display Matrix

By Adafruit Industries

Live Spotify Album Art Display

By SparkFun Electronics

SparkFun Qwiic Alphanumeric Display Hookup Guide

By SparkFun Electronics

View All Projects and Tutorials

By using the Co-Browse feature, you are agreeing to allow a support representative from DigiKey to view your browser remotely. When the Co-Browse window opens, give the session ID that is located in the toolbar to the representative.

DigiKey respects your right to privacy. For more information please see our Privacy Notice and Cookie Notice.

Yes, Continue to Co-Browse Settings Need Help? Product Help TechForum

Get fast and accurate answers from DigiKey's Technicians and Experienced Engineers on our TechForum.

Ask a Product Question Contact Us Live Chat Chat Check Order Status Check Order Status Returns & Issues Returns & Issues

Email: [email protected]

Call: 1-800-344-4539

Top FAQ's

How can I quickly find answers to my questions?

Please visit the Help & Support area of our website to find information regarding ordering, shipping, delivery and more.

What is my Order Status?

Registered users can track orders from their account dropdown, or click here. *Order Status may take 12 hours to update after initial order is placed.

How do I return product?

Users can begin the returns process by starting with our Returns Page.

How do I find price and availability?

Quotes can be created by registered users in myLists.

How do I create a 'myDigiKey' Account?

Visit the Registration Page and enter the required information. You will receive an email confirmation when your registration is complete.

United States/USD Summary resistor Fast Delivery

DigiKey customers in the United States can select from a range of delivery options, including Ground shipping at $6.99 and 2-Day at $12.99

resistor Payment Types

Credit account for qualified institutions and businesses

Payment in Advance by Wire Transfer

VisaMastercardAmerican ExpressDiscoverPayPalApple PayGoogle Pay

Marketplace Marketplace Product

More Products From Fully Authorized Partners

Average Time to Ship 1-3 Days. Please see product page, cart, and checkout for actual ship speed.

Extra Ship Charges May Apply

For more information visit Help & Support

Need Help? Feedback Stay Connected!

Thank you!

Keep an eye on your inbox for news and updates from DigiKey!

Please enter an email address

INFORMATION

About DigiKey Marketplace Sell on DigiKey.com Careers Site Map Digital Solutions Newsroom

HELP

Help and Support Order Status Shipping Rates/Options Returns and Order Issues Tariff Information

CONTACT US

Chat 1-800-344-4539 218-681-6674 [email protected] Co-Browse ECIA Member This site is protected by VikingCloud's Trusted Commerce program

FOLLOW US

Facebook X YouTube Instagram LinkedIn Download on the App Store Get it on Google Play United States United States Copyright © 1995-2025, DigiKey. All Rights Reserved. Terms & Conditions Privacy Notice Accessibility Statement Cookie Settings Local Support: 701 Brooks Avenue South, Thief River Falls, MN 56701 USA

Do Not Sell / Do Not Share My Personal Information

Tag » Arduino 7 Segments