Description
The MAX7219 8-Digit 7-Segment Socketed Red Display Module has eight 0.36″ 7-segment displays with a built-in MAX7219 serial LED driver.
PACKAGE INCLUDES:
- MAX7219 8-Digit 7-Segment Socketed Red Display Module
- Four brass standoffs with mounting screws
KEY FEATURES OF MAX7219 8-DIGIT 7-SEGMENT SOCKETED RED DISPLAY MODULE:
- Eight 7-Segment LED Displays with 0.36″ high red digits
- LED displays mounted in sockets
- Built-in MAX7219 LED Driver
- SPI 3-wire serial interface for easy hookup to MCU
- Can daisy-chain multiple modules together for larger displays
MAX7219 LED Driver
The MAX7219 is a popular and flexible 7-segment, bar graph and dot matrix common cathode LED driver that supports many functions for controlling LED displays.
The driver provides flexible individual LED segment control as well as basic functions such as turning the display ON/OFF and adjusting the LED brightness.
The MAX7219 communicates with a MCU via a 3-wire SPI bus. Once the display is updated by the MCU, the MAX7219 then takes care of all the work of keeping the display refreshed, so it removes that overhead from the MCU which can be off doing other more important things.
SPI Interface
The module communicates via the SPI interface, so it only require 3 data pins to connect to a MCU.
If a larger display is needed, several modules can be daisy-chained together.
Libraries are readily available such as the “LedControl.h” library built-in to the IDE for Arduino that makes communicating with the display very straightforward.
Module Connections
There are two 5-pin headers on the assembly.
Input Connector
The header pins on the left end with the pin labeling on top is the main input connector. “Vcc” connects to 5V. “GND” connects to ground which needs to be common with the MCU.
The other pins are for the SPI interface. “DIN” is the Data In. “CS” is Chip Select (sometimes labeled as LOAD) and “CLK is the Clock pin. These lasts 3 pins are connected to any digital outputs on the MCU. Which pins they connect to is defined when an instance of the LedControl is created as shown in the program below.
1 x 5 Header
- VCC – Connect to 5V.
- GND – Connect to system ground. This ground needs to be in common with the MCU.
- DIN – Connect to any digital pin on MCU.
- CS – Connect to any digital pin on MCU.
- CLK – Connect to any digital pin on MCU.
Output Connector
The header pins on the right end of the assembly is used if it is desirable to daisy-chain displays. This pins are labeled on the back of the module. In this case, the “DOUT” is Data Out and it connects to the next modules “DIN” Data in pin. The other pins are passed straight-thru
1 x 5 Header
- VCC – Connect to 5V on next module if looping power through.
- GND – Connect to GND on next module
- DOUT – Connect to DIN on next module.
- CS – Connect to CS / LOAD on next module
- CLK – Connect to CLK on next module
Assembly
The module ships with 4 brass standoffs and screws to attach them to the PCB. They can be used as feet to space the display off the surface or to mount the display to a substrate.
OUR EVALUATION RESULTS:
These are useful modules and provide an easy and inexpensive way to get a number display up and running on a project.
Since the 7-segment displays are socketed, some hobbyists remove the 7-segment LEDs and use these modules to sky-wire between the board and a remotely mounted 7-segment LED module when space is very tight. This can be the same 7-segment LED modules that are removed from the board or different ones such as a 6-digit display.
Because the 7-segment LEDs are socketed they can come loose in shipment. If the display is incorrect, ensure that they are firmly seated.
7-Segment displays are ideal for numeric or hexadecimal display. While some letters can be represented on the display, they are not fully alphanumeric though the program below makes an attempt at displaying some. If fully alphanumeric capability is required, you may want to look at our LCD or Dot Matrix displays.
The software below uses the “LedControl.h” library to implement basic functionality of the module.
The display is wired to digital pins 5,6 and 7, but these can be any 3 digital pins. Just redefine the pins in this statement
LedControl lc=LedControl(5,7,6,1); // (DataIn, CLK, Load/CS)
MAX7219 8-Digit 7-Segment Display Module Example Program
/* MAX7219 8-digit 7-segment LED test Basic code for configuring the device and outputting info to the display. Writes 'Arduino' on display and then counts up on the display until "99999999" is reached. Uses the "LedControl" Library which must be included */ #include "LedControl.h" /* Define pins for LedControl. These can be assigned to any digital output pins on a microcontroller. pin 5 is connected to the DataIn pin 7 is connected to the CLK Pin 6 is connected to LOAD / CS The 1 on the end is because we have only a single MAX72XX. */ LedControl lc=LedControl(5,7,6,1); unsigned long delaytime = 500; // delay between character updates long num = 0; // Variable to hold counter number //=============================================================================== // Functions //=============================================================================== // This routine displays a up-counter. This utilizes a clever technique using recursion by // Michael Teeuw http://michaelteeuw.nl/post/158404930702/the-recursive-ledcontrol-counter void showNumber(long number, byte pos = 0) { byte digit = number % 10; lc.setDigit(0,pos,digit,false); long remainingDigits = number / 10; if (remainingDigits > 0) { showNumber(remainingDigits, pos + 1); } } // This routine displays the characters for the word "Arduino" void writeArduinoOn7Segment() { lc.setChar(0,7,'a',false); delay(delaytime); lc.setRow(0,6,0x05); delay(delaytime); lc.setChar(0,5,'d',false); delay(delaytime); lc.setRow(0,4,0x1c); delay(delaytime); lc.setRow(0,3,B00010000); delay(delaytime); lc.setRow(0,2,0x15); delay(delaytime); lc.setRow(0,1,0x1D); delay(delaytime); delay (3000); lc.clearDisplay(0); delay(delaytime); } //=============================================================================== // Initialization //=============================================================================== void setup() { lc.shutdown(0,false); // Wakeup display lc.setIntensity(0,8); // Set brightness to a medium level lc.clearDisplay(0); // Clear the display writeArduinoOn7Segment(); } //=============================================================================== // Main //=============================================================================== void loop() { showNumber(num); num ++; if (num > 99999999) num = 0; // Filled the display so start the count over }
BEFORE THEY ARE SHIPPED, THESE MODULES ARE:
- Sample inspected and tested per incoming shipment
Notes:
- The back of the board contains the electronics, so some care should be used to avoid possible shorting if placed on a metallic surface.
- The alignment of the two 4-digit LED modules is sometimes a bit off relative to each other, but not enough to affect normal usage.
Technical Specifications
Display | Color | Red |
Operating Ratings | DC Power Input range | 4.0 – 5.5 VDC |
Display refresh rate | 800Hz (typical) | |
Reverse polarity protection | Yes | |
Dimensions | ||
Display Size with mounting ears | 83 x 15 mm (3.27 x 0.59″) | |
Display Height w/ PCB | 16mm (0.63″) (typical) | |
Character Height | 9.14mm (0.36″) | |
Datasheet | MAX7219 |