8X40 Dot Matrix Scrolling Text Using Max7219

8X40 Dot Matrix Scrolling Text Using Max7219:


In this project, we will be showing you how you can scroll texts on 8X4 Dot-matrix using Max7219 Integrated Circuit. Scrolling text is famous nowadays and can be seen anywhere. From billboard to TV set, from Airport to grocery stores, from subway stations to what have you. Now its time for you to display your own text.


You'll save processor pins and processing time with the MAX7219 LED driver! You can learn why this is true and how to use these devices on an Arduino in the sections below. You'll also learn how to use numerous devices with fewer CPU pins! You can drive 64 LEDs with a 7219 and just require three wires to connect it to a microcontroller (This excludes VCC and GND which are assumed to be available). Additionally, numerous 7219 chips can be daisy chained for larger displays. The 7219 has 16 output lines that drive 64 individual LEDs. This may seem impossible, but the driving technique takes use of how our eyes work. The use of persistence of vision is used to make the LEDs appear to be on all of the time when they are not. The LEDs are really organized in an 8x8 grid of rows and columns. Each column is pulsed for a short period of time while its row bits are driven. Because our eyes recall a flash of light for about 20 milliseconds, when you flash a light (or an LED) at a pace equal to or faster than 20 milliseconds, the light appears to never turn off. The 7219 operates in this manner. Individually, all of the leds are switched on for a short duration, at a rate of greater than 20ms.



Components:

  • Arduino UNO or NANO
  • 8X8 Dot Matrix module
  • Max7219


MaX7219:

The MAX7219/MAX7221 are serial input/output common-cathode display drivers for microprocessors (uPs) that connect to 7-segment numeric LED displays with up to 8 digits, bar-graph displays, or 64 individual LEDs. A BCD code-B decoder, multiplex scan circuitry, segment and digit drivers, and an 8x8 static RAM that saves each digit are all included on the chip. To set the segment current for all LEDs, only one external resistor is required. The MAX7221 is SPITM, QSPITM, and MICROWIRETM compatible, with slew-rate-limited segment drivers to prevent EMI. All common Ps are connected via a straightforward 4-wire serial interface. Without rewriting the entire display, individual digits can be addressed and modified. For each digit, the MAX7219/MAX7221 allow the user to choose between code-B decoding and no-decoding. A 150A low-power shutdown mode, analog and digital brightness control, a scan-limit register that allows the user to display from 1 to 8 digits, and a test mode are all included in the devices.


Features:

  • Serial Interface at 10 MHz
  • Decode/No-Decode Digit Selection for 
  • Individual LED Segment Control
  • Low-Power Shutdown (150A) (Data Retained)
  • On the power-up drive, the digital and analog brightness control
  • Displays are blanked. SPI, QSPI, MICROWIRE Serial Interface Common-Cathode LED 
  • Display Slew-Rate Limited Segment Drivers for Lower EMI (MAX7221) (MAX7221)
  • DIP and SO Packages with 24 Pins
  • Graphs with Bars
  • Panel Meters Industrial Controllers 
  • LED Matrix Displays

SPI Interface

The MAX7219 contains a four-wire SPI interface - clock, data, chip select, and ground - which makes connecting to a microcontroller a breeze.

  • Data MOSI stands for Master Output Serial Input. A slave device is the 7219.
  • Load (CSn) - active low Chip select.
  • SCK - Clock
  • Ground 





How to Select this component:

Open your Proteus and new projects, go-to place components, and type the correct names of the above components.


Wiring Layout for two MAX7219:

If you just have one breakout board, remove the one on the left.


Text can be scrolled from left to right in the layout below (It does not feel right to wire them up this way - but it is the way that this code allows for correct scrolling). Except for the center pin, which is Dout, the connections at the top of the board are identical to those at the bottom (black). The remaining four lines are joined in a straight line.

Wiring Layout for two MAX7219

Library MaxMatrix:

Unzip to the path of your sketches>/libraries directory for a manual installation. This is the second library that I utilized (MaxMatrix). This has a simple interface and allows you to scroll over the text in a variety of ways:

  • ShiftLeft is likely the only function you'll need (see example 3)
  • ShiftUp
  • ShiftRight - see the code notes (below) for more information on this one, as it isn't very useful.
  • ShiftDown


This library works well for most users who want to left scroll scrolling text, however it only works with the modules orientated as indicated in the wiring diagram below, i.e. only with COLS and ROWS switched. It will not operate with plug-in modules that have rows and columns that are correctly aligned (ones with a surface mount MAX7912 mounted on the back)


Using the MAX7219 with 3V3 Arduinos

As you can see from the specifications, the high input voltage level is quite high, well above the 3.3V high output level, necessitating the use of a level translator to drive the inputs on a 3.3V Arduino. Because the low input Vil is at a typical level, this isn't an issue!


The 7219 has a fast SPI interface that can operate at MHz frequencies, and depending on your project, you may wish to drive it at high rates, therefore you'll need a fast level converter, and some are slow. Because level conversion is only required in one direction, an HCT device like a 74HCT04 inverter running at 5V (simply use two inverters for correct signal levels or allow inverted signal levels - adjust them at the microcontroller) or a buffer like the 74HCT125 could be used.


How to Download the Proteus file and the code



Download


Post a Comment

Please Select Embedded Mode To Show The Comment System.*

Previous Post Next Post

Contact Form