Skip to content
7-Segment

TM1637 4-Digit 7-Segment Display

Simple 2-wire numeric display for clocks and counters.

The TM1637 drives a 4-digit 7-segment display (almost always with a center colon for clock displays) over a 2-wire protocol that looks like I2C but isn't quite — it uses its own bit-banged timing rather than the standard I2C peripheral, which is why it needs a dedicated software library instead of Wire.h. The chip also has a built-in keypad-scan input, though most hobbyist breakout modules don't wire up the buttons for it.

Its main appeal over the MAX7219 is simplicity for small digit counts: only two signal wires (CLK, DIO) instead of three, no external current-limiting resistor to worry about, and a one-line brightness call. It's the natural choice for clocks, timers, and simple 4-digit counters where you don't need the MAX7219's cascading or larger digit count.

Specifications

Digits4 x 7-segment digits, most modules include a center colon (:)
Operating voltage3.3V - 5V DC
Interface2-wire (CLK, DIO) — I2C-like bit-banged protocol, not standard I2C
Brightness8 software-adjustable levels via a single library call
Extra hardware featureBuilt-in key-scan input for a keypad matrix (unused on most breakout modules)

Pinout

PinNameDescription
1CLKClock line for the TM1637 protocol
2DIOBidirectional data line for the TM1637 protocol
3VCCPower, 3.3V-5V DC
4GNDGround

Despite the CLK/DIO naming looking like I2C SCL/SDA, do not wire this to a shared I2C bus or drive it with Wire.h — the timing is proprietary to the TM1637 and will not respond to standard I2C transactions. Use a dedicated library (TM1637Display by Avishorp, or similar) which bit-bangs the correct timing on any two GPIO pins.

Variants

The colon on the standard 4-digit module is wired as one shared segment, not two independent dots, so you can only turn it fully on or off, not blink each dot separately. If a design needs true HH:MM:SS with no digit limit, the 6-digit variant uses the same TM1637Display-style library calls with no protocol changes.

VariantTemp rangeHum rangeAccuracyProtocolPrice
TM1637 4-Digit (with colon)~$1-3
TM1637 6-Digit~$3-5

Board Integration

Library

TM1637Displayby Avishay Orpaz

Library Manager → search "TM1637" → install "TM1637 by Avishay Orpaz"

Wiring

Component pinBoard pinNote
CLKD2Any digital pin works — bit-banged protocol, not hardware I2C
DIOD3Any digital pin works
VCC5V
GNDGND

Code

C++

Notes

Colon segment (if present) is controlled via a bitmask on showNumberDecEx, not a separate pin.