Led display 8x8 with MAX6960

Hello everyone,

Although my knowledge of electronica are not very big :’(, I’m trying to create a library for controlling MAX6960, apart from those of the MAX72.

Even I have not even managed to turn a LED and all connections are ok. I would be grateful if this could help to create library for the entire world. :smiley:

Someone knows what is wrong?

int clock = 8;
int dataIn = 9;
int load = 10;

int maxInUse = 1;    //change this variable to set how many MAX7219's you'll use

int e = 0;           // just a varialble

// define max6960 registers
byte reg_address        = 0x00;
byte reg_pixel_intensity      = 0x01;
byte reg_panel_intensity      = 0x02;
byte reg_digit0      = 0x03;
byte reg_digit1      = 0x04;
byte reg_Fault      = 0x05;
byte reg_driver      = 0x08;
byte reg_LSB      = 0x09;
byte reg_MSB      = 0x0A;
byte reg_plane  = 0x0B;
byte reg_panel   = 0x0D;
byte reg_devices   = 0x0E;
byte reg_rows    = 0x0F;


void putByte(byte data) {
  byte i = 8;
  byte mask;
  while(i > 0) {
    mask = 0x01 << (i - 1);      // get bitmask
    digitalWrite( clock, LOW);   // tick
    if (data & mask){            // choose bit
      digitalWrite(dataIn, HIGH);// send 1
    }else{
      digitalWrite(dataIn, LOW); // send 0
    }
    digitalWrite(clock, HIGH);   // tock
    --i;                         // move to lesser bit
  }
}

void maxSingle( byte reg, byte col) {    
  digitalWrite(load, LOW);       // begin     
  putByte(reg);                  // specify register
  putByte(col);//((data & 0x01) * 256) + data >> 1); // put data   
  digitalWrite(load, LOW);       // and load da shit
  digitalWrite(load,HIGH); 
}

void setup () {
  pinMode(dataIn, OUTPUT);
  pinMode(clock,  OUTPUT);
  pinMode(load,   OUTPUT);

  beginSerial(9600);

  maxSingle(reg_devices, 0x00 + 0);
  maxSingle(reg_rows, 0x01);
  delay(100);
  maxSingle(reg_driver, 0x00);
  maxSingle(reg_panel, 0x31);  // 01100001
}  

void loop () {
  maxSingle(0,1);
  delay(2000);
}