MAX7219 Dot Matrix Scrolling Text Example with Arduino

This Arduino tutorial shows how to print and scroll text on MAX7219 LED dot matrix display. A potentiometer connected to Arduino analog channel is used to control the speed of the moving text. We’ll also see the simulation of this project using Labcenter Electronics Proteus circuit simulation software.

In the last post in this blog, I put a detailed information about the MAX7219 LED dot matrix display and how to interface it with Arduino development board, post link is the one below:
Interfacing MAX7219 LED Dot Matrix Display with Arduino

The MAX7219 LED dot matrix module used in this project is shown below, it just four cascaded devices and has a resolution of  8×32.

MAX7219 led dot matrix display - 4 cascaded modules

Hardware required:
This is a summary of project required parts.

  • Arduino board
  • MAX7219 LED dot matrix display module (4 cascaded devices)   —> MAX7219 IC datasheet
  • External 5V, 1A source
  • 10k potentiometer
  • Breadboard & some jumper wires

MAX7219 Dot Matrix Scrolling Text Example with Arduino Circuit:
The image below shows project circuit diagram.

MAX7219 dot matrix scrolling text with Arduino circuit diagram

As shown in the circuit diagram, the wring is very simple as described below:
MAX7219 module GND pin is connected to Arduino GND pin.
MAX7219 module DIN pin is connected to Arduino digital pin 11.
MAX7219 module CS (LOAD) pin is connected to Arduino digital pin 10.
MAX7219 module CLK pin is connected to Arduino digital pin 13.

The MAX7219 module has a total of 256 LEDs and powering this number of LEDs requires a lot of current the Arduino board and most Laptop USB ports cannot provide (max 500mA for most USB ports). For this reason an external power source of 5V and at least 1A is needed. Positive terminal of this power supply is connected to VCC pin of the MAX7219 module and negative terminal (or ground) is connected to GND pin of the MAX7219 module.

Note that Arduino digital pins 10, 11, and 13 are hardware SPI pins of the ATMEGA328P microcontroller respectively for SS (Slave Select), MOSI (Master-Out Slave-In) and SCK (Serial Clock).

In this example the potentiometer is used to control scrolling speed, its output is connected to Arduino analog channel 0.

Interfacing MAX7219 LED Dot Matrix with Arduino Code:
To be able to compile & upload project Arduino code, two libraries for the MAX7219 display are required. The first library is “MD_MAX72xx” which can be installed by going to:
Sketch menu —> Include Library —> Manage Libraries. In the Library Manager, search for “MD_MAX72xx” and install the library made by MajicDesigns.
The 2nd library is “
MD_Parola” which also can be installed online using Arduino IDE Library Manager, just search for “MD_Parola” and install the library made by MajicDesigns.

GitHub links for the two libraries:
MD_MAX72XX
MD_Parola

The “MD_Parola” is a nice library for dot matrix display modules and it does support different hardware types. The given link below contains a useful documentation about it:
Parola Library for Arduino Documentation

Programming hints:
All the used libraries are included in the Arduino code as given below:

MD_Parola Library configuration:
As mentioned above, we have a four cascaded MAX7219 devices and this number is defined in the Arduino code as shown below.
The CS (LOAD) pin of the display module is connected to Arduino digital pin 10.
Note that we’re using dot matrix type: FC-16. It’s also defined in Arduino code.

Potentiometer output is connected to Arduino A0 pin, it is defined in the code as:

Another configurations are required for the scrolling function which are: Scroll speed, Scroll direction (left-to-right or right-to-left), Scroll align (left or right), and Scroll pause (time in milliseconds). These configuration are made in the Arduino code as shown below:

Rest of Arduino code is described through comments.

Full Arduino Code:

The following video shows my simple DIY circuit of this project where Arduino NANO board is used.

Interfacing MAX7219 LED Dot Matrix with Arduino Proteus Simulation:
This project can be easily simulated using Proteus simulation software as shown in this video.

Arduino with MAX7219 module Proteus simulation file download:
Proteus simulation file of this project can be downloaded from the below Google Drive link. Use Proteus version 8.15 or higher to open it.
DOWNLOAD

1 thought on “MAX7219 Dot Matrix Scrolling Text Example with Arduino”

  1. Great tutorial! Thanks for sharing this detailed guide on how to create a scrolling text display using the MAX7219 LED dot matrix with Arduino. This is a fantastic project for both beginners and experienced Arduino enthusiasts.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top