Source: https://mokxi.com/parts/tm1637
Updated: 2026-11-10

Part

# Four-digit display, TM1637

Four digits and a colon on two wires. It looks like I2C and is not: no address, and bits go the other way around.

See every part

- 4 pins
- In 11 projects
- In 5 lessons

Drawn live by the editor's own code, at the size you see it.

At a glance

## The Four-digit display, TM1637 in brief

What it is, and where it sits on the bench.

The TM1637 is the driver on the red four-digit seven-segment clock module with a colon. Its four pins are CLK, DIO, VCC and GND, it runs from 3.3 to 5.5 V, and the board has 10 k pull-ups on both lines, so any two digital pins on an Uno or an ESP32 will do. It looks like I2C and is not: there is no address, so two modules on one pair of wires show the same thing, and bytes go least significant bit first, so Wire cannot drive it. A driver sends 0x40, then 0xC0 and four segment bytes, then 0x88 plus a brightness, and Mokxi decodes all of it from the pin edges, with the acknowledge on the ninth clock. Bit 7 of the second digit is the colon and does nothing on the other digits, which is why showNumberDecEx() takes 0b01000000 for it. The eight brightness levels are the datasheet’s pulse widths, 1, 2, 4, 10, 11, 12, 13 and 14 sixteenths, so level 3 is a big jump. The key scan reads 0xFF. The 800 Hz multiplexing, the 250 kHz clock limit and test mode are not modeled.

Family

Displays

Pins

4

Pins

## 4 pins

Named as the editor names them, so a wire lands where you expect it.

- CLK
- DIO
- VCC
- GND

How to use it

## How to use the TM1637 display with an Arduino

Four wires: CLK to A0, DIO to A1, VCC to 5 V and GND to GND. Any two pins work, because the TM1637 is not I2C: it has no address and sends bytes least significant bit first, so it never goes on the Wire pins and Wire cannot talk to it. TM1637Display bit-bangs it on the two pins you give the constructor.

The Pomodoro timer counts down with showNumberDecEx(mmss, 0b01000000, true): the 0b01000000 lights the colon, which is wired only to the second digit, and true keeps the leading zero in 05:00. setBrightness() takes 0 to 7, and the steps are not even: 3 is a big jump from 2.

Part pin

Board pin

CLK

A0

DIO

A1

VCC

5 V

GND

GND

TM1637Display compiles on every board here, and the module runs from 3.3 V, so an ESP32 drives it on any two GPIOs.

Hold the button

This is the simulator itself, running here. Click anything to open it in the editor.

Open this project in the editor Read the full tutorial

Minutes and seconds with the colon

How it is modeled

## What is true about the Four-digit display, TM1637, here

In its help article’s own words: what the simulation gets right, and where it stops.

### The TM1637, which is not I2C

The four-digit display looks exactly like an I2C device (the same START, the
same STOP, an acknowledge on a ninth clock), and it is not, in two ways that
break every attempt to drive it with a Wire library:

- There is no address. The first byte after a START is a command, so the
chip answers everything on the wire. Two of them share a pair of pins and show
the same thing.

- Bytes go least significant bit first. I2C is most significant first. Get
it the wrong way around and the display lights a plausible-looking set of wrong
segments, which is a hard bug to see.

The three transfers a driver sends are 0x40 (write display data,
auto-incrementing), 0xC0 followed by four segment bytes, and 0x80 | 0x08 | brightness. One byte a digit, bit 0 is segment A through bit 6 for G, and
bit 7 is the colon, on the second digit only, which is the module's wiring
rather than the chip's, and is why every library has a special case for it.

The eight brightness steps are pulse widths out of sixteen: 1, 2, 4, 10, 11, 12,
13, 14. They are not evenly spaced, which is why level 3 is such a jump.

### Not modeled

Clock stretching, which none of these three chips does anyway. Arbitration
between two masters. Ten-bit addressing. And the rate: the parts decode the bus
from its edges and impose no timing of their own, so a driver that is too fast
works here where a real device would not answer.

Arduino I2C LCD not working uses a scanner and Wire.endTransmission() to tell a wiring fault from a wrong address.

The tutorial Arduino TM1637 walks through Pomodoro timer: TM1637Display, the colon, leading zeros and a countdown timed with millis().

From Two wires, several chips, in full.

Projects

## See the Four-digit display, TM1637 in a project

11 built-in projects use it. Each opens in the editor, already wired.

Lessons

## Where it turns up in a lesson

5 lessons place it in their own circuits.

### Learn articles

5 lessons

- Arduino DS3231 Clock With a TM1637 Display
- Arduino enum: Named States, enum class and Switch
- Arduino TM1637 Display: Library and Countdown
- Arduino DS1302 RTC: an Alarm Clock With Code
- Arduino Whack-a-Mole Game: LEDs, Buttons, Score

Boards

## The boards it is shown on

Each of these 3 boards has a built-in project with the Four-digit display, TM1637 in it.

- Arduino Uno R3
- Arduino Mega 2560
- SparkFun Pro Micro

Boards

## The Four-digit display, TM1637 on each board

The pins, the voltage and the code change from board to board. Each page has that board’s wiring and a circuit you can run.

- Arduino Uno and TM1637 Display
- ESP32 and TM1637 Display
- Arduino Nano and TM1637 Display
- Arduino Mega and TM1637 Display

Libraries

## Arduino libraries for the Four-digit display, TM1637

Built in, so the sketch compiles with nothing to install. Each page has the calls, the wiring and an example to run.

- TM1637
- TM1638plus
- TM1637TinyDisplay

More parts

## The rest of the bench

Every one of these is drawn and simulated the same way.

Full-size breadboard

A real 0.1 inch grid with the rails and the center channel, 63 columns wide.

Jumper wires

Drag from any pin or hole to any other. Corners snap, and you can drag them.

Power

A supply rail at the voltage you choose.

Ground

The other end of every circuit.

LED

Lights when current flows. Five colors, and the brightness is what your eye would see.

Filament lamp

A tungsten bulb in a holder: an inrush when it is switched on cold, tens of milliseconds to warm up, and dim on half its voltage.

Resistor

Any value you like, with the color bands drawn to match.

ESP32-C3-DevKitM-1

A RISC-V board that runs your firmware at 160 MHz on the real memory map.

Pushbutton

A 12 mm tactile switch. Hold it while the simulation runs.

Raspberry Pi Pico

The RP2040 board on our own Cortex-M0+ core. Pick a program and press Run.

Raspberry Pi Pico W

Raspberry Pi Pico W (RP2040). The same board and the same pinout as a Pico, with the CYW43439 on it. The WiFi is simulated (no radio; real internet through the Cloud panel’s switch), and the on-board LED, which hangs off that chip rather than off GP25, is driven through the same path. Everything else is the Pico.

Raspberry Pi 4 Model B

Raspberry Pi 4 Model B: the 40-pin header, driven by main.py with RPi.GPIO or gpiozero.

See every part

## Wire up the Four-digit display, TM1637

Open the editor and push it into the breadboard. It is free, and it runs on your own machine.

Start building free Open the editor
