MAX7219 led 8x8 Matrix, sometimes all leds constantly on

Thread Starter

Luka Dragicevic

Joined Dec 16, 2016
9
Hello,

I've got an issue with my MAX7219 chip connected on my MCU (STM32). I'm programming in MikroC for ARM, and I've got working code for my led matrix which displays some random text when I turn on my mcu. But sometimes when I run my mcu, my led matrix just displays all 8x8 leds are constantly on, and nothing changes.

Does anyone know why this could happen to me?
I've attached my code if it could affect solution.

P.S. If I can somehow notice, this happens always after some period while mcu was turned off, and after that when I switch off - on my matrix will display right screen

For any further information, free feel to ask me.

Thanks in advance
 

Attachments

AlbertHall

Joined Jun 4, 2014
12,345
Schematic please.

This code confuses me:
Chip_Select2 = 0; // SELECT MAX
SPI2_Write(0x00);
SPI2_Write(0xFF); // No test
Chip_Select2 = 1; // DESELECT MAX
Register 0x00 is the no-op register. Register 0x0F is the display test register.
 

Thread Starter

Luka Dragicevic

Joined Dec 16, 2016
9
read the timing diagram in the datasheet.
I am sorry, I haven't mentioned, that I'm not familiar with this way of programming (electronics in general), I am doing first embedded project, so I would appritate if you could help me. Thanks. Which timing diagram should I look at?
 

dannyf

Joined Sep 13, 2015
2,197
check the datasheet for the various timing specifics and compare that to your code to see where those timing parameters may not hold true.
 
Top