Arduino MAX7219 7-Segment Display Tutorial : 5 Steps - Instructables
Maybe your like
Introduction: Arduino MAX7219 7-Segment Display Tutorial
By MrSottongMy Youtube ChannelFollow More by the author: 

About: someone who likes electronics More About MrSottong »MAX7219 is an IC that is used to drive 7-segment LEDs (up to 8 digits), block displays (bar displays), and 64 individual LEDs that are comon cathodes. To communicate with a microcontroller, MAX7219 uses the SPI communication system. So to drive 64 LEDs only need 3 ports of the microcontroller.
In this article I will show you how to use a 7-Segement module that uses IC MAX7219 as the driver.
Required components:
- MAX7219 7-Segment Module
- Arduino Nano
- wire Jumper
- USB mini
Required Library:
- LedControl
In this tutorial I use Arduino Nano board. If you have never used it. I suggest reading my previous article about "How to Use Arduino Nano".
Step 1: Assemble All Components
Connect the Arduino board to the 7-Segment module. See the picture or instruction that I wrote below:
Arduino to 7-Segment
+5V => VCC
GND => GND
D12 => DIN
D11 => CLK
D10 => CS/LOAD
Step 2: Add Library
After the circuit is complete. Add the "LedControl" library to the Arduino IDE.
To add a library to Arduino, you can read it in the article "How to Add an External Library to Arduino" that I made earlier".
Step 3: Additional Functions
After adding the LedControl library. You can use additional functions to control the 7-Segment module.
- Argument
- Function
For more details, please read here.
Step 4: Upload Sketch
I have sketched for the trial of this 7-Segment module. You can copy the code below, then paste it in your sketch.
//We always have to include the library
#include "LedControl.h"
/*
Now we need a LedControl to work with. ***** These pin numbers will probably not work with your hardware *****
pin 12 is connected to the DataIn
pin 11 is connected to the CLK
pin 10 is connected to LOAD
We have only a single MAX72XX.
*/
LedControl lc=LedControl(12,11,10,1);
/* we always wait a bit between updates of the display */
unsigned long delaytime=500;
void setup() {
/* The MAX72XX is in power-saving mode on startup, we have to do a wakeup call */
lc.shutdown(0,false);
/* Set the brightness to a medium values */
lc.setIntensity(0,8);
/* and clear the display */
lc.clearDisplay(0);}
void hello(){
lc.setChar(0,7,'H',false);
lc.setChar(0,6,'E',false);
lc.setChar(0,5,'L',false);
lc.setChar(0,4,'L',false);
lc.setChar(0,3,'0',false);
lc.setChar(0,2,'.',false);
lc.setChar(0,1,'.',false);
lc.setChar(0,0,'.',false);
delay(delaytime+1000);
lc.clearDisplay(0);
delay(delaytime);
lc.setDigit(0,7,1,false);
delay(delaytime);
lc.setDigit(0,6,2,false);
delay(delaytime);
lc.setDigit(0,5,3,false);
delay(delaytime);
lc.setDigit(0,4,4,false);
delay(delaytime);
lc.setDigit(0,3,5,false);
delay(delaytime);
lc.setDigit(0,2,6,false);
delay(delaytime);
lc.setDigit(0,1,7,false);
delay(delaytime);
lc.setDigit(0,0,8,false);
delay(1500);
lc.clearDisplay(0);
delay(delaytime);
}
void loop() { hello();
}
Or download the file below:
Attachments
LecContro MAX7219.inoDownload
Step 5: Result
Ejoy the result.
If there are questions just write them in the comments column.
See you in next article.
Tag » Arduino 7-segment Anzeige I2c
-
Use A 7-Segment Display With An I2C I/O Expander - Arduino Cloud
-
I2C - Using The Serial 7-Segment Display - Learn.
-
Using The Serial 7-Segment Display - Sparkfun Learn
-
How To Setup Adafruit 7 Segment LED Display W/I2C Backpack
-
Adafruit 1.2" 4-Digit 7-Segment Display W/I2C Backpack - Red
-
Adafruit 4-Ziffern 7-Segment Display Mit I2C Backpack Für Arduino
-
4 Bits Numérique Le Tube Le Display LED Le Module I2C ... - AZ-Delivery
-
Nr.12 - 7 Segment Anzeige - Kits Und Anleitungen Für Arduino
-
Vielseitige I2C-7-Segment-Anzeige I2C-4DLED – Für Arduino Oder ...
-
Seven-segment Multiplexing Using Arduino And MAX7219
-
Adafruit 0.56 4-Digit 7-Segment Display W/I2C Backpack - Yellow
-
4 Digit Seven 7 Segment Anzeige Rot Zahlen Tm1637 Arduino Pi I2c ...
-
7-Segment Anzeigen - Bastelgarage Elektronik Online Shop
