max7219 game of life

does anyone have the code or a website with the code for a 8x8 led matrix with a max7219 and a arduino because i cant find it anywhere

I very recently posted code for setting up a MAX7221 for having it display stuff.

Your game will consist of an 8 byte array of rows or columns:

gameDispay[8]; // holds your display info
spiAddresses[8]; // holds the MAX7221 display register addresses

// so you need to send this data to the MAX7219/7221:

digitalWrite (chipSelect, LOW); // grab the chips attention
for (int x=0; x<8; x=x+1) {  // send out 8 bytes of data
SPI.transfer(spiAddress[x]); // send the register address
SPI.transfer (gameDispay[x]); // send the data
digitalWrite (chipSelect, HIGH); // tells the chip to stop listening

This become part of void loop(), other parts do the game logic and update the gameDisplay array
You need a few other commands like above to set up some of the other MAX7221 control registers, telling it No decode mode, not in standby, brightness level, etc. Is all spelled out in the data sheet, find it at