MAX7219 using LED matrix studio

hi there!

i am about to give up,

im using MAX7219 cascade 16X16 (total of 1024 led)
and i cant find any template to use for my generated files from the "LED matrix studio"
all the example that i found are for test scroll

below an example of generated animation frame:

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

byte ledarray[][] = {
                    {0B11111111, 0B11000000, 0B00000011, 0B11111111},
                    {0B10000000, 0B01000000, 0B00000010, 0B00000001},
                    {0B10000000, 0B01000000, 0B00000010, 0B00000001},
                    {0B10000000, 0B01000000, 0B00000010, 0B00000001},
                    {0B10000000, 0B01000000, 0B00000010, 0B00000001},
                    {0B10000000, 0B01000000, 0B00000010, 0B00000001},
                    {0B10000000, 0B01000000, 0B00000010, 0B00000001},
                    {0B10000000, 0B01000000, 0B00000010, 0B00000001},
                    {0B10000000, 0B01000000, 0B00000010, 0B00000001},
                    {0B11111111, 0B11000000, 0B00000011, 0B11111111},
                    {0B00000000, 0B00000000, 0B00000000, 0B00000000},
                    {0B00000000, 0B00000000, 0B00000000, 0B00000000},
                    {0B00000000, 0B00000000, 0B00000000, 0B00000000},
                    {0B00000000, 0B00000011, 0B10000000, 0B00000000},
                    {0B00000000, 0B00000011, 0B10000000, 0B00000000},
                    {0B00000000, 0B00000011, 0B10000000, 0B00000000},
                    {0B00000000, 0B00000000, 0B00000000, 0B00000000},
                    {0B00000000, 0B00000000, 0B00000000, 0B00000000},
                    {0B00000000, 0B00000000, 0B00000000, 0B00000000},
                    {0B00000000, 0B00000000, 0B00000000, 0B00000000},
                    {0B00000000, 0B00000000, 0B00000000, 0B00000000},
                    {0B01111111, 0B11111111, 0B11111111, 0B11111100},
                    {0B01100000, 0B00000000, 0B00000000, 0B00001100},
                    {0B01100000, 0B00000000, 0B00000000, 0B00011000},
                    {0B00110000, 0B00000000, 0B00000000, 0B01110000},
                    {0B00011100, 0B00000000, 0B00000001, 0B11000000},
                    {0B00000111, 0B00000000, 0B00000111, 0B00000000},
                    {0B00000001, 0B11000000, 0B00001100, 0B00000000},
                    {0B00000000, 0B01110000, 0B00111000, 0B00000000},
                    {0B00000000, 0B00001100, 0B01100000, 0B00000000},
                    {0B00000000, 0B00000111, 0B11000000, 0B00000000},
                    {0B00000000, 0B00000000, 0B00000000, 0B00000000},

};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////

and the code thats been generated using the LED matrix studio:

// ===============================================
// LED Matrix Studio MAX72xx code
//
// Render a scrolly animation across the display
//
// LED Matrix Studio, new single colour, 8 high by any width
//
// Draw your message/pattern on the matrix and export using
// the Export Code option.
//
// See LED_Matrix.leds in the \codetemplates\ folder.
//
// maximumoctopus.com
// maximumoctopus.com/electronics/builder.htm
// 
// ===============================================

// this should be included with your arduino install
// if it's not installed then add it from the Library Manager:
//     Sketch->Include Library->Library Manger
// or 
// Download LedControlMS library from here:
// http://www.instructables.com/id/LED-Matrix-with-Arduino/step2/Arduino-Library/
#include "LedControlMS.h"

// pin 12 is connected to the DataIn 
// pin 11 is connected to the CLK 
// pin 10 is connected to LOAD / CS
//
LedControl lc = LedControl(12, 11, 10, 16);

unsigned long delaytime = 100;

byte ledarray[] = {
                  0x00, 0x00, 0x03, 0xFF, 0x00, 0xE0, 0x02, 0x01, 0x01, 0xE0, 0x02, 0x01, 0x03, 0x20, 0x02, 0x01, 0x02, 0x20, 0x02, 0x01, 0x06, 0x20, 0x02, 0x01, 0x04, 0x20, 0x02, 0x01, 0x0C, 0x20, 0x02, 0x01, 0x08, 0x20, 0x02, 0x01, 0x18, 0x20, 0x03, 0xFF, 0x10, 0x20, 0x00, 0x00, 0x10, 0x20, 0x00, 0x00, 0x20, 0x20, 0x00, 0x00, 0x60, 0x20, 0x00, 0x00, 0x40, 0x20, 0xE0, 0x00, 0x40, 0x20, 0xE0, 0x00, 0x40, 0x20, 0xE0, 0x00, 0x60, 0x20, 0x00, 0x00, 0x30, 0x20, 0x00, 0x00, 0x10, 0x20, 0x00, 0x00, 0x18, 0x20, 0x00, 0x00, 0x0C, 0x20, 0x00, 0x00, 0x04, 0x20, 0x03, 0xFF, 0x06, 0x20, 0x02, 0x01, 0x02, 0x20, 0x02, 0x01, 0x03, 0x20, 0x02, 0x01, 0x01, 0x20, 0x02, 0x01, 0x01, 0xA0, 0x02, 0x01, 0x00, 0xE0, 0x02, 0x01, 0x00, 0x60, 0x02, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x03, 0xFF,   //  1
                  };


byte idx = 0;
byte dir = 0;

// ===================================================================

void setup()
{
   lc.shutdown(0, false); // wake the MAX72xx
   lc.setIntensity(0, 8); // Set the brightness to midpoint
   lc.clearDisplay(0);    // clear display
}

void loop()
{ 
   writeToMatrix();
 
   delay(delaytime);
 
   if (dir == 0)
   {
       if (idx != 128 - 8)
       {
           idx++;  
       }
       else
       {
           dir = 1;
       }
   }  
   else
   {
       if (idx != 0)
       {
           idx--;
       }
       else
       {
           dir = 0;
       }
   }
}

void writeToMatrix()
{
   lc.setRow(0, 0, ledarray[idx + 0]);
   lc.setRow(0, 1, ledarray[idx + 1]);
   lc.setRow(0, 2, ledarray[idx + 2]);
   lc.setRow(0, 3, ledarray[idx + 3]);
   lc.setRow(0, 4, ledarray[idx + 4]);
   lc.setRow(0, 5, ledarray[idx + 5]);
   lc.setRow(0, 6, ledarray[idx + 6]);
   lc.setRow(0, 7, ledarray[idx + 7]);  
}

the code is been uploaded but the frame is corrupted

?

I might be wrong, but I belive what you are actually using is the LedControl.h library and if you read that library documentation, you will see that it is written to control only a maximum of 8 Off MAX7219 Matracies.

LedControl lc = LedControl(12, 11, 10, 16); might compile, but it will not control 16 Matracies as one chain, belive me I have tried, until I discovered the limitations of LedControl.

I would look at using the far more extensive and excellent MD_MAX72XX or even better the MD_ PAROLA libraries which should already be available with the Arduino IDE distribution.

Hope that helps.