MAX7219 8 digit 7-Segment Module (HCMODU0260)

LCD, TFT, OLED, LED modules
Post Reply
admin
Site Admin
Posts: 880
Joined: Sun Aug 05, 2012 4:02 pm

MAX7219 8 digit 7-Segment Module (HCMODU0260)

Post by admin » Wed Oct 16, 2024 4:07 pm

Image


Image

This 8 digit seven segment display module (HCMODU0260) is based upon the Maxim MAX7219 LED display driver. The module uses two standard 4 digit seven segment displays to display a total of 8 digits in RED with decimal point. A convenient input and output header allows additional modules to be daisy-chained and controlled with just just 3 digital IO pins. For panel mounting, the module has 4 mounting holes.

The Maxim MAX7219 driver allows for each segment of up to 8 digits (with decimal point) to be controlled individually from a serial interface. An 8x8 static ram area stores each digit and multiplexing the display is handled automatically.

If you plan to use this module with an Arduino board we have written an exclusive library (HCMAX7219) than allows you to effortlessly display and scroll alphanumeric characters across one or more modules. This can be downloaded from the software section of our support forum here:

viewforum.php?f=58


The module is supplied with unsoldered 1x 4 way right angle and 1x way straight pin headers.


HOBBY COMPONENTS NOTES:

PLEASE NOTE WHEN CONNECTING MULTIPLE MODULES: The modules are fitted with a reverse polarity protection diode in series with the 5V (VCC) supply. This has the effect of reducing the voltage on the VCC output pin relative to the voltage applied to its VCC input pin. Therefore when daisy-chaining multiple modules you should either supply 5V to each module's VCC input pin separately, or remove the diode (D1) on each additional module.


Specification
Model number:		HCMODU0160
Driver:			Maxim MAX7921
Voltage:			4.0 - 5.5V
Max current:		180mA (all LEDs on)
Min current:		<0.5mA (shutdown mode)
Length:			82.3mm
Width:			15mm
Height:			11.5mm (approx)
Display length:		61mm
Display width:		14.3mm






Image


Image


  1. /* FILE:    HCMODU0082_Serial_7_Segment_Module_Example2
  2.    DATE:    19/03/15
  3.    VERSION: 0.2
  4.    
  5. REVISIONS:
  6.  
  7. 12/03/15 Created version 0.1
  8. 19/03/15 Updated to work with V0.2 of the HCMAX7219 library
  9.  
  10. This is an example of how to use the Hobby Components serial 8 digit seven 7
  11. segment display module (HCMODU0082). To use this example sketch you will
  12. need to download and install the HCMAX7921 library available from the software
  13. section of our support forum (forum.hobbycomponents.com) or on github:
  14. (https://github.com/HobbyComponents)
  15.  
  16. The library assumes you are using one module. If you have more than one module
  17. connected together then you will need to change the following line in the
  18. libraries HCMAX7219.h header file to the number of drivers you have connected:
  19.  
  20. #define NUMBEROFDRIVERS 1 <- Change this number
  21.  
  22.  
  23. PINOUT:
  24.  
  25. MODULE.....UNO/NANO.....MEGA
  26. VCC........+5V..........+5V
  27. GND........GND..........GND
  28. DIN........11...........51
  29. CS (LOAD)..10...........10
  30. CLK........13...........52
  31.  
  32. You may copy, alter and reuse this code in any way you like, but please leave
  33. reference to HobbyComponents.com in your comments if you redistribute this code.
  34. This software may not be used directly for the purpose of promoting products that
  35. directly compete with Hobby Components Ltd's own range of products.
  36.  
  37. THIS SOFTWARE IS PROVIDED "AS IS". HOBBY COMPONENTS MAKES NO WARRANTIES,
  38. WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED
  39. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ACCURACY OR
  40. LACK OF NEGLIGENCE. HOBBY COMPONENTS SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE
  41. FOR ANY DAMAGES INCLUDING, BUT NOT LIMITED TO, SPECIAL, INCIDENTAL OR
  42. CONSEQUENTIAL DAMAGES FOR ANY REASON WHATSOEVER. */
  43.  
  44. /* Include the HCMAX7219 and SPI library */
  45. #include <HCMAX7219.h>
  46. #include "SPI.h"
  47.  
  48. /* Set the LOAD (CS) digital pin number*/
  49. #define LOAD 10
  50.  
  51. /* Create an instance of the library */
  52. HCMAX7219 HCMAX7219(LOAD);
  53.  
  54.  
  55. void setup()
  56. {
  57.   HCMAX7219.Init();        
  58. }
  59.  
  60. /* Main program */
  61. void loop()
  62. {
  63.   byte Loopcounter;
  64.   byte Position;
  65.  
  66.   /* SCROLL SOME TEXT 5 TIMES BEFORE MOVING ON */
  67.   for (Loopcounter = 0; Loopcounter <= 5; Loopcounter++)
  68.   {
  69.     /* We are scrolling 30 characters of text across the entire display */
  70.     for (Position = 0; Position <= DISPLAYBUFFERSIZE + 30; Position++)
  71.     {
  72.       /* Write the test to the output buffer at the position we require */
  73.       HCMAX7219.print7Seg("HCMAX7219 SCROLLING TEXT DEMO ",Position);
  74.       /* Send the output buffer to the display */
  75.       HCMAX7219.Refresh();  
  76.       delay(200);
  77.     }
  78.   }
  79.  
  80.  
  81.   /* WE CAN ALSO DISPLAY INTEGER NUMBERS */
  82.  
  83.   /* Clear the output buffer */
  84.   HCMAX7219.Clear();
  85.   /* Write some text and output it*/
  86.   HCMAX7219.print7Seg("INT NUM.",8);
  87.   HCMAX7219.Refresh();
  88.   delay(2000);
  89.  
  90.   /* display an example of a negative integer number */
  91.   HCMAX7219.Clear();
  92.   HCMAX7219.print7Seg(-1234567,8);
  93.   HCMAX7219.Refresh();
  94.   delay(2000);
  95.  
  96.   /* Clear the output buffer */
  97.   HCMAX7219.Clear();
  98.   /* Write some text and output it*/
  99.   HCMAX7219.print7Seg("WITH DP.",8);
  100.   HCMAX7219.Refresh();
  101.   delay(2000);
  102.  
  103.   /* Show the DP in different places. Notice when the DP is at the
  104.     beginning the number is padded with a zero */
  105.   HCMAX7219.Clear();
  106.   for (Position = 1; Position <= 7; Position++)
  107.   {
  108.     HCMAX7219.print7Seg(-1234567,Position,8);
  109.     HCMAX7219.Refresh();
  110.     delay(1000);
  111.   }
  112. }



Image


HCMAX7921 Arduino library for above sketch is available for download from the software section of our support forum here:

http://forum.hobbycomponents.com/viewto ... =58&t=1794

Or from github here:
https://github.com/HobbyComponents/HCMAX7219

MAX7921 Datasheet:
max7219.pdf



Libraries, example code, and diagrams are provided as an additional free service by Hobby Components and are not sold as part of this product. We do not provide any guarantees or warranties as to their accuracy or fitness for purpose.
You do not have the required permissions to view the files attached to this post.

Post Reply

Return to “Display”