Sample code for connecting 8x8 Dot Matrix Display with MAX7219 to Arduino using SPI interface
Wiring:
MODULE ----- UNO/NANO ----- MEGA
===============================
VCC --------- +5V ----------+5V
GND --------- GND --------- GND
DIN --------- 11 ---------- 51
CS (LOAD) --- 10 ---------- 10
CLK --------- 13 ---------- 52