LedControl lib + MAX7221 + 8x8 Matrix

Hello,

I have got the following matrix:
1088BS

  • Forward voltage: approx 2V

  • Forward current: 5 - 10mA

A regular MAX7221 and an Arduino MEGA.
I have wired up everything according to the http://playground.arduino.cc/Main/MAX72XXHardware guide, RSet is 68K.
I have tried 3 chips, 2 different matrices, different Arduinos, but it’s looks dead. I mean always alive. Every single LED is on, no metter what they are ON.
And YES I have changed the LedControl lc=LedControl(12,11,10,1); to LedControl(51,52,10,1);

I’m the one, who is messing this up I am more than sure. HEEEELP! ]:slight_smile:

A-1088BS-8x8matrix display.pdf (304 KB)

I had some problems with a Max7219 and a 1088AS display. [TheArduino page you cite explains the minor differences between the 7221 and the 7219. The 1088AS looks similar to the 1088BS except it’s the opposite polarity.]

To help me trouble shoot, I bought a “MAX7219 Dot matrix module display module DIY kit” on eBay. Mine came from “Funny DIY” and cost $3.73 with free shipping. There are plenty of other sources on eBay. The one I got requires soldering but it’s straightforward. There are also soldered versions available.

The kit has sockets for both the 7219 and for the display so it’s easy to swap suspicious parts in and out. I figured out that my original 7219 didn’t work properly. I also had problems with the code I found on-line.

My code is a work in progress but it might help you figure out your problem. Right now I only have 3 displays daisy chained together. I’ve gotten it to move a column of 1’s back and forth at my command. Eventually, I’m going to use it as a marquee to display mp3 information.

#include "LedControl.h"
int DataPin = 12;
int LatchPin = 10;
int ClockPin = 11;

LedControl lc=LedControl(12,11,10,3);
 
int address;
int devices;
int RowData[64];
int character,scroll_column,each_column;
 
void setup() 
{  devices=lc.getDeviceCount();                  //get number of devices
  for(int address=0;address<devices;address++)   //we have to init all devices in a loop
  {    lc.shutdown(address,false);               //The MAX72XX is in power-saving mode on startup
       lc.setIntensity(address,8);               // Set the brightness to a medium values
       lc.clearDisplay(address);                 // and clear the display
  }
   Serial.begin(9600);      // open the serial port at 9600 bps: 
}
 
void showRow(int theDisplay,int myRow, int theVal) 
{    lc.setRow(theDisplay, myRow, theVal);
}

void clearArray()
{ for (int i= 0; i<64;i++)
    {   RowData[i]=0;
    }
}

void showArray()
{ for (int i= 0; i<64;i++)
    {  address = i/8;
       showRow(address,i%8,RowData[i]); 
    }
}

void stepRight()
{ for (int i= 0; i<63;i++)
    {   RowData[63-i]=RowData[62-i];
    }
}

void stepLeft()
{ for (int i= 0; i<62;i++)
    {   RowData[i]=RowData[i+1];
    }
}

void loop()
 {   RowData[0]=0xff;
     for (int i=0; i<23;i++)
     {   showArray();
         stepRight();
         RowData[0]=0x00;
         delay(3);
     }
     
     RowData[63]=0xff;     
     for (int i=0; i<23;i++)
     {  showArray();
        stepLeft();
        RowData[63]=0x00;
        delay(3);
     }    
     RowData[0]=0xff;
     for(int i=1; i<23;i++)
      {  for (int j=0; j<i; j++)
          {  showArray();
             stepRight();
             RowData[0]=0x00;
             delay(5);
          }
       for (int j=0; j<i; j++)
          {  showArray();
             stepLeft();
             RowData[63]=0x00;
             delay(5);
          }      
          delay(500);        
       }
 }