8x8 Serial Dot Matrix Module (HCMODU0135)

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

8x8 Serial Dot Matrix Module (HCMODU0135)

Post by admin » Tue Feb 26, 2019 11:38 am

Image




This serial LED dot-matrix module consists of an 8x8 grid of red LEDs. It is based on the Maxim MAX7219 serial LED controller IC which gives the module the ability to not only be programmed via the serial (SPI) interface of a microcontroller, but also allows it to be daisy-chained so that multiple modules can be linked together and controlled with just 3 digital pins (Din, Clk, CS). The driver board for the module does not extend beyond the LED module itself and so multiple modules can be added as both columns and rows without any gaps between each module allowing for much larger displays to be constructed.

ImageImage

For Arduino uses we have also written an exclusive library (HCDisplay) which will help you develop your project with the minimum of effort. This library can be downloaded from the support section of our support forum here:

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



Specification:

Product code: HCMODU0135
Interface: Serial (SPI)
Controller: MAX7219
Number of LEDs: 64 (8x8)
LED colour: Red
Voltage: 4.0 - 5.5V
Max current: 370mA (all LEDs on, max brightness)
Min current: <0.5mA (shutdown mode)
Dimensions: 32mm x 32mm x 12mm








Example Arduino Sketch:

  1. /* FILE:    HCDisplay_Dot_Matrix_Hello_World
  2.    DATE:    20/12/18
  3.    VERSION: 0.1
  4.    AUTHOR:  Andrew Davies
  5.    
  6. 20/12/18 version 0.1: Original version
  7.  
  8. This example sketch demonstrates how to use the HCDisplay library to scroll some
  9. text on the MAX7219 dot matrix display module(s). This sketch supports the following
  10. displays:
  11.  
  12. MAX7219 Serial LED dot matrix module - Red (SKU: HCOPTO0014).
  13. 8x8 LED Square Dot Matrix Module (Red) (SKU: HCOPTO0014).
  14.  
  15. Connect your module(s) to you Arduino as follows:
  16.  
  17. MODULE............UNO/NANO
  18. GND...............GND
  19. VCC...............5V
  20. DIN...............11 (MOSI)
  21. CLK...............13 (SCK)
  22. CS................10 (SS)
  23.  
  24. NOTE: TO USE THIS SKETCH YOU MUST FIRST SELECT THE VERSION OF DISPLAY YOU HAVE BY
  25. UNCOMMENTING THE APPROPRIATE LINE IN THE OPTIONS.H FILE WHICH CAN BE FOUND IN THE
  26. HCDISPLAY LIBRARY FOLDER. For windows users avoid using the Windows Notepad editor
  27. as it doesn't format things properly
  28.  
  29. If you have more than one module connected you must tell the sketch what
  30. configuration you have them connected by changing the values for DRIVERS_X &
  31. DRIVERS_Y in the sketch below.
  32.  
  33. More information about this library can be found in the software section of our
  34. support forum here:
  35.  
  36. http://forum.hobbycomponents.com/software
  37.  
  38.  
  39. You may copy, alter and reuse this code in any way you like, but please leave
  40. reference to HobbyComponents.com in your comments if you redistribute this code.
  41. This software may not be used directly for the purpose of selling products that
  42. directly compete with Hobby Components Ltd's own range of products.
  43. THIS SOFTWARE IS PROVIDED "AS IS". HOBBY COMPONENTS MAKES NO WARRANTIES, WHETHER
  44. EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
  45. MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ACCURACY OR LACK OF NEGLIGENCE.
  46. HOBBY COMPONENTS SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR ANY DAMAGES,
  47. INCLUDING, BUT NOT LIMITED TO, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY
  48. REASON WHATSOEVER. */
  49.  
  50. #include "HCDisplay.h"
  51.  
  52.  
  53. /*******************************************************************************************************/
  54. /**************************************** USER SETTINGS ************************************************/
  55. /*******************************************************************************************************/
  56.  
  57. #define CS 10           //Digital pin used for the modules chip select (CS)
  58.  
  59. #define DRIVERS_X  1    //Number of modules daisy-chained in the X direction
  60. #define DRIVERS_Y  1    //Number of modules daisy-chained in the Y direction
  61.  
  62. /*******************************************************************************************************/
  63.  
  64.  
  65. #define RES_X (DRIVERS_X * 8)  //Resolution in pixels in the x direction
  66.  
  67. uint8_t Buffer[RES_X * DRIVERS_Y]; //Display buffer used by the HCDisplay library
  68.  
  69. HCDisplay HCDisplay;    //Creates an instance of the HCDisplay library
  70.  
  71.  
  72.  
  73. void setup()
  74. {
  75.   HCDisplay.Init(CS, DRIVERS_X, DRIVERS_Y, Buffer);  //Initialise the display
  76. }
  77.  
  78.  
  79. void loop()
  80. {
  81.   HCDisplay.SetFG(1); HCDisplay.SetBG(0); // Set the foreground and background colours
  82.   ScrollText("Hello World!");             // Print some text
  83.  
  84.   HCDisplay.SetFG(0); HCDisplay.SetBG(1); // Reverse the foreground and background colours
  85.   ScrollText("HobbyComponents.com");      // Print some text
  86. }
  87.  
  88.  
  89.  
  90. /* Scroll some text. Demonstrates the Print() & Pos() functions. */
  91. void ScrollText(uint8_t *Text)
  92. {
  93.   int Length = strlen(Text) * 8;  // Calculate length of string in pixels.
  94.  
  95.   // Scroll the text across the display
  96.   for(int x = RES_X; x > -Length; x--)
  97.   {
  98.     HCDisplay.Pos(x, 0);
  99.     HCDisplay.Print(Text);
  100.     delay(50);
  101.   }
  102. }


Image


The HCDisplay library for the above sketch can be downloaded from the software section of this support forum here:

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


LED Matrix F3 Square schematic.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 no provide any guarantees or warranties as to their accuracy or fitness for purpose.

Descriptions and diagrams on this page are copyright Hobby Components Ltd and may not be reproduced without permission.
You do not have the required permissions to view the files attached to this post.

Post Reply