Led matrix

siluk:
Well I didn't put the capacitors, because it said it's not mandatory. I will buy the capacitors and try again. I attached the code of the book. I tried to modify the text in there and sometimes it runs well, depending on the text that's written. I guess there's something with the code, trying to figure out what...

Thanks for posting the actual code. I've briefly looked through it and didn't notice anything that would cause the problems you describe. However, while going through the datasheet for the MAX7219 I noticed it has a shutdown mode that blanks the display to save power. You should look at page 6 & 7 and make sure that the data being sent isn't accidientally causing the MAX7219 to enter this mode (again I didn't see any indication it would from what you posted, but this possibility should be eliminated).

Adding the capacitors certainly won't hurt, and might improve things. I also think Riva's suggestion about reducing the intensity setting is probably the next line of inquire you should try.