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
  /* Set the brightness to a medium values */
  /* and clear the display */

 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};  



void loop() 

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



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)