Yeah this code is just to see if that short hand stuff will cycle the anodes, i just dont know why it wont display...
// code for a 36 x 24 array (12 RGB LEDs, 24 columns)
#include <SPI.h>
// set up an array for the cathode drives
byte cathode6[] = { //chip 6, first 3rd of display
0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
byte cathode7[] = { //chip 7, second 3rd of display
0, 0, 0, 0, 0, 0, 0, 0, 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0, 0, 0, 0, 0, 0, 0, 0
};
byte cathode8[] = { //chip 8, third 3rd of display
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01
};
byte chip5 = 0xFF; //chip values
byte chip4 = 0xFF;
byte chip3 = 0xFF;
byte chip2 = 0xFF;
byte chip1 = 0xFF;
int columncount = 0;
unsigned int time = 500;
const int oe = 10;
void setup(){
pinMode(oe, OUTPUT);
digitalWrite(oe, LOW);
SPI.begin();
Serial.begin(9600);
}
void loop(){
//we have to transfer out the cathodes first
SPI.transfer(cathode8[columncount]);
SPI.transfer(cathode7[columncount]);
SPI.transfer(cathode6[columncount]);
columncount = columncount + 1; // update for next column
if (columncount == 24){
columncount = 0; // reset if reach the end
}
//transfer out those colors
SPI.transfer(chip5);
SPI.transfer(chip4);
SPI.transfer(chip3);
SPI.transfer(chip2);
SPI.transfer(chip1);
Serial.println(cathode8[columncount], HEX);
Serial.println(cathode7[columncount], HEX);
Serial.println(cathode6[columncount], HEX);
Serial.println(chip5, HEX);
Serial.println(chip4, HEX);
Serial.println(chip3, HEX);
Serial.println(chip2, HEX);
Serial.println(chip1, HEX);
delay(time);
} // end void loop
The board is working perfectly, the octals are acting just like shift registers. but the oe isnt working, they are all connected though.