Source: https://mokxi.com/led-matrix-simulator

Simulator

# An 8x8 LED matrix simulator on a MAX7219

Mokxi is a free online LED matrix simulator that runs in your browser, with nothing to install and no account needed. An Arduino Uno bounces a 2x2 ball around an 8x8 LED matrix driven by a MAX7219, three wires and eight registers. When the ball hits a wall, that wall lights for a frame.

Start building free or read the MAX7219 tutorial

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

Click to open it in the editor

The ball bounces and the walls flash. Click the circuit to open it in the editor.

## What you can do here

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

- Draw on an 8x8 matrix a pixel at a time, or a row byte at a time
- Chain up to eight MAX7219 modules for a scrolling sign
- Change the brightness and watch the intensity register work
- Leave out the init and see why a real module stays dark
- Build a game: the snake game runs on two chained matrices
- Use WS2812B pixels in a matrix layout for color

## What the running circuit shows

A row register is a row of LEDs.

DIN goes to pin 11, CS to pin 10 and CLK to pin 13. The MAX7219 holds eight digit registers and scans them itself; on a matrix module those eight registers are the eight rows and the segment outputs are the columns, so writing a register draws a row. The sketch keeps the eight bytes in RAM, moves the ball one pixel every 90 ms, and pushes all eight out.

In the engine the matrix has 4 pixels lit, the ball, until it reaches an edge. It moves diagonally from a corner, so it hits two walls at once every sixth frame, and on that frame the lit count jumps to 16: the ball plus the two edge rows it touched. A bounce also turns the brightness up from 8 to 15 for that frame.

## How the MAX7219 is simulated

The registers, in the order the datasheet gives them.

The part decodes 16-bit packets clocked in on DIN and latched by CS: the eight digit registers, decode mode, intensity, scan limit, shutdown and display test. Every register comes up zero, which means shut down with one row scanned, so a sketch that never writes them gets a dark matrix, exactly the fault a real module shows. Several modules chain from DOUT to DIN, and a packet for the far one passes through the near one.

The MAX7219 LED matrix with Arduino Snake on two LED matrices The NeoPixel simulator The 7 segment display simulator

## 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.

Does it work with the LedControl or MD_Parola library?

The circuit on this page uses Mokxi’s small MAX7219 driver. The module only cares about the packets on its pins, so any library that sends the datasheet’s packets draws the same picture; the editor’s library list says which compile.

Can I chain several 8x8 matrices?

Yes. Set the module’s count up to eight, or wire DOUT of one to DIN of the next.

Can I make a color LED matrix?

Use WS2812B pixels with the layout set to matrix. Each pixel is full color, and the NeoPixel simulator page has a running strip to start from.

## 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 7 segment display 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

## Draw on an LED matrix

Open the circuit, draw your own frame and press Run. Nothing to install, and no account needed.

Start building free Open the editor
