close
20180418_173001_1

Overview

Visual cues ,e.g. hand signals,  are a time-tested communication schemes that help humanity survive throughout the history. It provides a simple, quick, yet understandable common ground for communication. Light-emitting Diodes (LEDs) are  typical electronic elements to demonstrate a visual cue, such as indicating a device’s ON or OFF states.

What if we arranged LEDs in a matrix? This is now employed in many displays to demonstrate intricate patterns, patterns that would result in images.

Electronic visual displays, such as an LCD or OLED screens, are important devices to make a project more human-friendly i.e. readable.

This simple project utilizes an 8×8 LED Matrix with a built-in MAX7219 to project a running message “CreateLabz” in the LED Matrix.

Hardware Used

Software Used

Libraries Used

HCMAX7219.h
             This Arduino library is used to work with MAX7219 LED Driver IC which is attached already in the 8×8 Matrix LED module.

             This library also supports an 8-digit 7-segment module (HCMODU0082) and an 8×8 Serial Dot Matrix Display Module (HCOPTO0014).

SPI.h

             This library helps you communicate with the SPI devices using the SPIN pins (pins 10-13). We used pins 10 (LOAD/CS), 11 (DIN/SDI), and 13(SCL/CLK) for this project.

MAX7219 driver

             This serial input/output common-cathode microprocessor display drivers interfaces microprocessors to 7-segment numeric LED displays of up to bar graph displays, series of 7-segment displays, and 8×8 LED matrix displays. Since the driver is already in the module, it is convenient and pin configurations are simplified.

Application Discussion

              The MAX7219 is a multiplexing chip that is commonly paired as a LED Driver to an 8×8 LED Matrix. A library, HCMAX7219, is imported which serves as a pre-coded address writer.

             To install the library, Go to the installation folder of Arduino. In default setup, the folder is usually located at C:/Program Files x86/Arduino/libraries. Extract the content of the zip in the library folder.

 

The Guts of the Matrix LED is what you really expect. LEDs arranged in a matrix. Duh ! 🙂

Schematics

Code

Code Description

This line of code imports the HCMAX7219.h library installed in the local Arduino Library folder.

Sets the LOAD (CS) digital pin number

Create an instance of the library

Initializes the Loopcounter, and the Position of the character.

Clears the display on the 8×8 Matrix

The inner for loop displays on the 8×8 Matrix the string “CreateLabz Academy”. The position, with respect to the 64 horizontal dots on the display, increments every 80ms. For this instance, The pixels of C moves to the left every 80ms.

The HCMAX7219.Refresh() updates the current LEDs on the 8×8 Matrix. This is similar to the refreshing of the monitor, where delay(80) serves as the refresh rate.

The 180 serves as the pixel width of the running message. If the pixel width is greater than the message, there will be no display. If the pixel width is less than the message, the message will be cut short.

Library Description/Functions

The HCMAX7219.cpp and .h library can drive cascaded 7-segments and 8×8 Matrix LEDs. Define in the pre-processor (or the topmost part of the code) the following which suits your need.

Function calls in the library

Conclusion

             The 8×8 Matrix LED with MAX7129 is a versatile electronic component that can be connected via  OUT->IN pins to drive more than 1 matrix (cascading multiple matrix modules).

 

Reference

https://github.com/HobbyComponents/HCMAX7219

http://forum.hobbycomponents.com/viewtopic.php?f=58&t=1794

https://datasheets.maximintegrated.com/en/ds/MAX7219-MAX7221.pdf

https://www.circuitspecialists.com

Tags : 8x8 Matrix8x8 Matrix LEDarduinoDisplayLED matrixMatrixMatrix LEDMAX7129Running Message

Leave a Response