Go Down

Topic: PixeltoMatrix.exe for a custom LED size matrix (Read 4572 times) previous topic - next topic

3DPiper

Pauls,



Thank you! I couldn't wrap my head around not having enough direct pins to drive all columns, I didn't even think of re-using them since I would have enough pins for all rows.

You mean this:



That totally makes sense and lets me use only one chip. Magic!

Thank you thank you

Paul__B


3DPiper

I hooked it up exactly as shown above and ran this simple code:

Code: [Select]
#include "LedControl.h" //  need the library
LedControl lc=LedControl(12,11,10,1); //

// pin 12 is connected to the MAX7219 pin 1
// pin 11 is connected to the CLK pin 13
// pin 10 is connected to LOAD pin 12
// 1 as we are only using 1 MAX7219

void setup()
{
  // the zero refers to the MAX7219 number, it is zero for 1 chip
  lc.shutdown(0,false);// turn off power saving, enables display
  lc.setIntensity(0,1);// sets brightness (0~15 possible values)
  lc.clearDisplay(0);// clear screen
}
void loop()
{

  for (int row=0; row<8; row++)
  {
    for (int col=0; col<8; col++)
    {
      lc.setLed(0,col,row,true); // turns on LED at col, row
      delay(25);
    }
  }

  for (int row=0; row<8; row++)
  {
    for (int col=0; col<8; col++)
    {
      lc.setLed(0,col,row,false); // turns off LED at col, row
      delay(25);
    }
  }
}


I realize my LED Matrix will not be in order, but I just wanted to see some lights blinky blinky.

However, upon compiling an uploading all the LEDs turned on at the same time and nothing happens.

I'll check my wiring again, but I'm sure I have it breadboarded correctly.

Any other reason this should not be working?

PaulRB

Didn't you have this working before with 2 x max chips?

Have you got anodes and cathodes mixed up? Probe the matrix with 5V + series resistor to check.

Have you got all necessary components connected to the max chip: the Iset resistor and two caps (0.1uF & 10uF)?

Go Up