Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Displays & LEDs
  4. ›7-Segment Displays
Step 9 of 17 in Displays and lightsPart of a learning path.
Next

How-to · Beginner · 3 min read

7-Segment Displays

Common Anode vs Cathode, TM1637 and MAX7219

By Geekobot Learning Team · Updated 24 Oct 2026

I'm using
Wiring, code and the Run it panels follow your board.
On this page
Short answerCommon anode vs common cathodeSingle-digit pinout (typical 0.56 inch)Driving one digit from an ArduinoThe easy way: TM1637 4-digit moduleTM1637 vs MAX7219 vs bare digitsTry itCommon mistakesFAQsParts and next steps
Short answer

A 7-segment display is seven LEDs (plus a decimal point) arranged as a figure 8. In a common-cathode display all cathodes share one pin and you drive each segment high; in common-anode they share the positive pin and you drive segments low. Each segment needs its own resistor. For clocks and counters, a TM1637 4-digit module needs only two pins and a small library.

Key specs at a glance

Segments
a to g plus DP; 10 pins on a single digit
Forward voltage
About 2 V red, 3 V blue/white
Per-segment current
5 to 15 mA, resistor 220 to 470 Ω at 5 V
TM1637 module
4 digits, 2 wires (CLK, DIO), 3.3 to 5 V
MAX7219 module
Up to 8 digits or an 8x8 matrix, SPI, 5 V
Multiplexing
Needed when driving several bare digits from few pins
01

Common anode vs common cathode

Find the common pin (usually the middle pin on each row of a single digit). Set a multimeter to diode test: with the black lead on the middle pin and red on any other pin, a lit segment means common cathode; if it lights with the red lead on the middle pin, it is common anode. Code for one type is the inverse of the other, which is why a wrong assumption shows every segment except the ones you wanted.

02

Single-digit pinout (typical 0.56 inch)

PinSegment
1e
2d
3common
4c
5DP
6b
7a
8common
9f
10g
PinSegment
1
e
2
d
3
common
4
c
5
DP
6
b
7
a
8
common
9
f
10
g
03

Driving one digit from an Arduino

Connect segments a to g to pins 2 to 8 through 330 Ω resistors each, and the common to GND (common cathode). Digits are patterns of segments:

Count 0 to 9 on a common-cathode digit · Arduino C++Verify & upload in Electrolark
const int seg[7] = {2, 3, 4, 5, 6, 7, 8};        // a b c d e f g
const byte digits[10] = {
  0b0111111, 0b0000110, 0b1011011, 0b1001111, 0b1100110,
  0b1101101, 0b1111101, 0b0000111, 0b1111111, 0b1101111 };   // bit0 = a ... bit6 = g

void setup() { for (int p : seg) pinMode(p, OUTPUT); }

void show(int n) {
  for (int i = 0; i < 7; i++) digitalWrite(seg[i], bitRead(digits[n], i));   // invert for common anode
}

void loop() {
  for (int n = 0; n < 10; n++) { show(n); delay(500); }
}
04

The easy way: TM1637 4-digit module

The TM1637 chip handles all the multiplexing and brightness; you send numbers over two wires. Install the TM1637Display library (Avishay Orpaz).

Clock-style display with TM1637 · Arduino C++Verify & upload in Electrolark
#include <TM1637Display.h>
TM1637Display display(2, 3);   // CLK, DIO

void setup() {
  display.setBrightness(5);    // 0 to 7
}

void loop() {
  display.showNumberDecEx(1245, 0b01000000, true);   // 12:45 with the colon
  delay(1000);
}
05

TM1637 vs MAX7219 vs bare digits

OptionPins usedDigitsChoose it for
Bare single digit81Learning how segments work
Bare 4-digit multiplexed124Teaching multiplexing; otherwise avoid
TM1637 module24 (6 on some)Clocks, counters, temperature readouts
MAX7219 module3 (SPI)8 digits or 8x8 matrix, chainableScoreboards, scrolling text, large readouts
HT16K33 backpack2 (I2C)4 digits, 14-segment tooI2C-only pin budgets
Bare single digit
Pins used:
8
Digits:
1
Choose it for:
Learning how segments work
Bare 4-digit multiplexed
Pins used:
12
Digits:
4
Choose it for:
Teaching multiplexing; otherwise avoid
TM1637 module
Pins used:
2
Digits:
4 (6 on some)
Choose it for:
Clocks, counters, temperature readouts
MAX7219 module
Pins used:
3 (SPI)
Digits:
8 digits or 8x8 matrix, chainable
Choose it for:
Scoreboards, scrolling text, large readouts
HT16K33 backpack
Pins used:
2 (I2C)
Digits:
4 digits, 14-segment too
Choose it for:
I2C-only pin budgets
06

Try it: LED resistor calculator

Change the values and the diagram and results update as you type.

07

Common mistakes to avoid

  • !Driving a display without segment resistors.
  • !Mixing up common anode and common cathode.
  • !Using one shared resistor on the common pin, which makes brightness vary with the number of lit segments.
  • !Multiplexing bare digits with delay() in the loop, which makes them flicker.
  • !Running a 5 V TM1637 module from 3.3 V and getting dim or missing segments; most work at 3.3 V but check yours.
08

Frequently asked questions

How do I know if a 7-segment display is common anode or common cathode?

Use a multimeter in diode mode between the common pin and a segment pin. If the segment lights with the black lead on the common pin it is common cathode; with the red lead on common it is common anode.

Do I need a resistor for a 7-segment display?

Yes, one per segment (220 to 470 Ω at 5 V) so every segment gets the same current. TM1637 and MAX7219 modules include the current control.

What is the TM1637?

A driver chip that controls up to six 7-segment digits over two wires, with brightness control. It is the easiest way to add a numeric display to an Arduino or ESP32.

Can I use a 7-segment display with an ESP32?

Yes. TM1637 modules work at 3.3 V logic, and MAX7219 modules usually accept 3.3 V data when powered from 5 V.

How many 7-segment displays can one Arduino drive?

With MAX7219 modules, dozens by chaining them on one SPI bus. With TM1637 modules, one per pair of pins.

Parts for this guide

  • 7-Segment LED Display 0.56", 1 Digit
    ₹9View
  • TM1637 4-Digit 7-Segment Display Module
    ₹55View
  • MAX7219 LED Display Module
    ₹78View
  • Resistor Assortment Kit (30 Values)
    ₹33View
Shop 7-Segment & Dot Matrix

Calculators

LED resistor calculator

Terms in this guide

Common anodeA 7-segment or RGB LED where all anodes share one pin connected to the supply, and each segment is lit by pulling its cathode LOW.Common cathodeA 7-segment or RGB LED where all cathodes share one pin connected to ground, and each segment is lit by driving its anode HIGH.MultiplexingDriving several displays or LEDs from a few pins by switching between them faster than the eye can see.Forward voltageThe voltage a diode or LED drops when conducting: about 0.7 V for silicon diodes, 1.8 to 3.3 V for LEDs.SPISerial Peripheral Interface: a fast bus with clock, data in, data out and a chip-select line per device.

Projects that use it

Put this into practice: 71 step-by-step builds in our project library use parts from this guide.

Beginner · 1 hourReaction timer gameView projectBeginner · 1 hourDigital clock with real-time clockView projectBeginner · 45 minutesBig-digit room thermometerView project
Browse all 71 projects

Keep learning

Component guideBeginnerLEDs ExplainedAn LED (light-emitting diode) lights when current flows from its longer leg (anode, +) to its shorter leg (cathode, -).3 min read · Displays & LEDsComponent guideBeginnerResistors ExplainedWhat resistors do, how to read 4- and 5-band colour codes and SMD codes, Ohm's law, power ratings, standard values and uses: LEDs, pull-ups, dividers.4 min read · Passive ComponentsHow-toBeginner16x2 LCD with I2CA 16x2 LCD shows two lines of 16 characters using the HD44780 controller.3 min read · Displays & LEDsHow-toBeginnerSSD1306 OLED DisplayThe SSD1306 is the driver chip in most small monochrome OLED displays, such as the popular 0.96 inch 128x64 module.3 min read · Displays & LEDsComponent guideBeginnerArduino UnoThe Arduino Uno is a beginner-friendly microcontroller board that reads sensors and controls LEDs, motors and relays using simple C++ programs called sketches.5 min read · Boards & Microcontrollers

Sources

  • TM1637 datasheet (Titan Micro)
  • MAX7219 datasheet (Analog Devices)
  • Kingbright single-digit display datasheets

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerCommon anode vs common cathodeSingle-digit pinout (typical 0.56 inch)Driving one digit from an ArduinoThe easy way: TM1637 4-digit moduleTM1637 vs MAX7219 vs bare digitsTry itCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide4 items · ₹175

7-Segment LED Display 0.56", 1 Digit · TM1637 4-Digit 7-Segment Display Module · MAX7219 LED Display Module · Resistor Assortment Kit (30 Values)

Run itChange the inputs and watch the output
0
1111110Pins a..g

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Run itChange the inputs and watch the output
12:45

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question