Source: https://mokxi.com/seven-segment-display-simulator
Updated: 2026-10-25

Simulator

# A 7 segment display simulator that counts

Mokxi is a free online 7 segment display simulator that runs in your browser, with nothing to install and no account needed. An Arduino Uno drives a common-cathode seven-segment display straight from eight pins, each segment through its own 220 ohm resistor, and counts from 0 to 9 once a second.

Start building free or see the display part

- 455 parts on the bench
- 43 boards running now
- 1.00x real time, on every board

Click to open it in the editor

It counts 0 to 9 and the dot blinks on odd digits. Click the circuit to open it in the editor.

## What you can do here

In the circuit above, or in the editor it opens.

- Watch each digit drawn from a one-byte segment pattern
- Change the font table and make letters or your own symbols
- Switch the display to common anode and see what has to change
- Pick red, green, blue, yellow or white segments
- Move up to a four-digit display, a TM1637 or a MAX7219
- Drive one from logic chips alone with a CD4511 decoder

## What the running circuit shows

Seven LEDs and a byte per digit.

Each segment is an LED, so a digit is a pattern of lit segments. The sketch keeps the ten digits as one byte each, segment a in the lowest bit (0x3F for 0, 0x06 for 1, up to 0x6F for 9), and walks the seven bits setting each segment’s pin: a on pin 7, b on 6, c on 5, d on 11, e on 10, f on 8 and g on 9, with the dot on pin 4. In the engine the display shows 0 to 9 a second apart, the serial monitor prints each digit, and the dot is lit on the odd ones.

Seven resistors, one per segment, is the right way to wire one: every segment gets the same current whatever the digit. The cheap way, one resistor on the common pin, makes an 8 dimmer than a 1, and the electronic dice project wires it that way so you can see the difference.

## The truth table, digit by digit

Which segments each number lights, and the byte for it.

Segments are named a to g clockwise from the top, with g across the middle. With segment a in the lowest bit, as in the running sketch, the ten digits on a common-cathode display are: 0 lights a, b, c, d, e and f (0x3F); 1 lights b and c (0x06); 2 lights a, b, d, e and g (0x5B); 3 lights a, b, c, d and g (0x4F); 4 lights b, c, f and g (0x66); 5 lights a, c, d, f and g (0x6D); 6 lights a, c, d, e, f and g (0x7D); 7 lights a, b and c (0x07); 8 lights all seven (0x7F); and 9 lights a, b, c, d, f and g (0x6F).

Letters come from the same table. The hex digits are A (0x77), b (0x7C), C (0x39), d (0x5E), E (0x79) and F (0x71), with b and d in lower case so they do not look like 8 and 0. Letters such as K, M, W and X have no shape on seven segments that reads clearly. On a common-anode display a segment lights on LOW, so every bit is inverted.

## Displays in the parts bin

From one digit to eight, with or without a microcontroller.

The single digit comes common cathode or common anode. The parts bin also has a four-digit display you multiplex yourself, a TM1637 module with its own driver chip, an eight-digit MAX7219 module, an HT16K33 backpack, and a CD4511 BCD decoder that drives a digit from four switches with no code at all.

7 segment display with Arduino Four digits, multiplexed The TM1637 module BCD to 7 segment, no code

## Questions

Is it free?

Yes. The circuit on this page, every part in it and the editor it opens in are on the free plan, with no card.

Do I need an account?

No. The circuit runs the moment the page does, and the editor opens without one. A free account is only for saving a project to the cloud and sharing it by link.

Common anode or common cathode?

Both. Set the part’s common property. On a common-anode display the common pin goes to 5 V and a segment lights when its pin goes LOW, so the sketch inverts every bit.

What is the 7 segment display truth table for 0 to 9?

With segment a in the lowest bit, 0 to 9 are 0x3F, 0x06, 0x5B, 0x4F, 0x66, 0x6D, 0x7D, 0x07, 0x7F and 0x6F on a common-cathode display. The running sketch keeps exactly that table, one byte per digit.

Can I simulate a 4 digit 7 segment display?

Yes, with the four-digit part and a multiplexing sketch, or with a TM1637 or MAX7219 module that does the multiplexing for you.

Can I build one without an Arduino?

Yes. A CD4511 decoder takes a four-bit number from switches or a counter chip and lights the right segments, and the BCD decoder page has that circuit running.

## More simulators

Each one opens on a circuit that is already running.

Online circuit simulator Breadboard simulator ESP32 simulator Op-amp simulator Logic gate simulator LED circuit simulator Servo simulator LCD simulator OLED simulator NeoPixel simulator LED matrix simulator Stepper motor simulator Motor driver simulator Ultrasonic sensor simulator Rectifier simulator Digital circuit simulator Potentiometer simulator PWM simulator Relay simulator Shift register simulator DHT11 simulator RFID simulator Accelerometer simulator RGB LED simulator Buzzer simulator MOSFET simulator Circuit simulator for kids Flip-flop simulator Multiplexer simulator Full adder simulator I2C simulator UART simulator Thermistor simulator PIR sensor simulator Oscilloscope simulator Multimeter simulator DC motor simulator Traffic light simulator Diode simulator Capacitor simulator Series and parallel circuit simulator Wheatstone bridge simulator Voltage regulator simulator Soil moisture sensor simulator Zener diode simulator Solar panel simulator AC circuit simulator Thevenin simulator Decoder simulator Encoder simulator PID simulator Robot arm simulator Load cell simulator IR sensor simulator LM35 simulator HC-05 Bluetooth simulator nRF24L01 simulator

## Make a display count

Open the circuit, change the font and press Run. Nothing to install, and no account needed.

Start building free Open the editor
