16x16 LED dot matrix with shift registers

I'm trying to control a 16 x16 dot matrix. I have wired up 2 cascading 74HC595 shift registers for the columns and 2 4017 cascading decade counters for the rows!

However, i'm very new to this and i'm afraid the programming is over my head.

Could I possibly have some help???

Thank you

i'm afraid the programming is over my head.

I think the hardware is too.

You can't get enough current from a 4017 to drive 16 LEDs.

However, if you wire the HC595 for the columns or current sinks, then you need to take the output of the 4017 and turn that into a current source capable of supplying enough current for 16 LEDs, assuming that each LED is taking 20mA that is a current source of 320mA. Simplest way it to use a logic inverter on each output and use that to drive some p-channel FETs to supply the current.

When you have this the software is simple. 1) reset the 4017 2) clock out the 16 bits representing the first column into the 595 3) Clock the 4017 on one count 4) toggle the latch the 595 5) Delay or otherwise don't do anything with the displays 6) repeat from step 2 for the other 16 rows. 7) when all 16 rows are done go to step 1.

You're right the hardware is over my head also, that's why I'm going to use 2 MAX7219's to run my 16x16 LED matrix. Less wiring i believe...

I have got it working with an 8x8 matrix by using an example code that came with the ledcontrol.h library. I've chopped and changed it so i understand it a bit better now.

here is what i've been using to light the four corners of the 8x8 matrix as a test:

#include "LedControl.h"

LedControl lc=LedControl(12,11,10,1);

/* we always wait a bit between updates of the display */
unsigned long delaytime=1000;

void setup() 
{
  /*
   The MAX72XX is in power-saving mode on startup,
   we have to do a wakeup call
   */
  lc.shutdown(0,false);
  /* Set the brightness to a medium values */
  lc.setIntensity(0,14);
  /* and clear the display */
  lc.clearDisplay(0);
}



 void  writeBoxes()

 {
   byte TL[8]={B11000000,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000};
   byte TR[8]={B00000011,B00000011,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000};
   byte BR[8]={B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B00000011};
   byte BL[8]={B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11000000,B11000000};  
  

  lc.setRow(0,0,TL[0]);
  lc.setRow(0,1,TL[1]);
  lc.setRow(0,2,TL[2]);
  lc.setRow(0,3,TL[3]);
  lc.setRow(0,4,TL[4]);
  lc.setRow(0,5,TL[5]);
  lc.setRow(0,6,TL[6]);
  lc.setRow(0,7,TL[7]);
  lc.setRow(0,8,TL[8]);
  delay(delaytime);
  lc.setRow(0,0,TR[0]);
  lc.setRow(0,1,TR[1]);
  lc.setRow(0,2,TR[2]);
  lc.setRow(0,3,TR[3]);
  lc.setRow(0,4,TR[4]);
  lc.setRow(0,5,TR[5]);
  lc.setRow(0,6,TR[6]);
  lc.setRow(0,7,TR[7]);
  lc.setRow(0,8,TR[8]);
  delay(delaytime);
  lc.setRow(0,0,BR[0]);
  lc.setRow(0,1,BR[1]);
  lc.setRow(0,2,BR[2]);
  lc.setRow(0,3,BR[3]);
  lc.setRow(0,4,BR[4]);
  lc.setRow(0,5,BR[5]);
  lc.setRow(0,6,BR[6]);
  lc.setRow(0,7,BR[7]);
  lc.setRow(0,8,BR[8]);
  delay(delaytime);
  lc.setRow(0,0,BL[0]);
  lc.setRow(0,1,BL[1]);
  lc.setRow(0,2,BL[2]);
  lc.setRow(0,3,BL[3]);
  lc.setRow(0,4,BL[4]);
  lc.setRow(0,5,BL[5]);
  lc.setRow(0,6,BL[6]);
  lc.setRow(0,7,BL[7]);
  lc.setRow(0,8,BL[8]);
  delay(delaytime);

}

void loop() 
{ 
  writeBoxes();
}

I think im comfortable enough to put switches in to display a different pattern when pressed.

But I will need help to program for the 16x16 matrix using two MAX7219's. I dont understand the codes that i've looked at so far...

All your help is much appreciated

Thanks

Fraser

for the 16x16 matrix using two MAX7219's.

As one Max7219 will control 64 LEDs don't you think that to control 256 LEDs you will need four MAX7219s ? (no need for an apostrophe as it is plural)