MajicDesigns / MD_MAX72XX

LED Matrix Library
GNU Lesser General Public License v2.1
307 stars 122 forks source link

Flash on initialization for MAX7219 #62

Closed elan closed 9 months ago

elan commented 9 months ago

Subject of the issue

With MAX7219, initialization can cause a quick flash in the display. The reason is this line here:

https://github.com/MajicDesigns/MD_MAX72XX/blob/main/src/MD_MAX72xx.cpp#L119

This causes the MAX7219 to latch in random data. Removing the line fixes the issue.

MajicDesigns commented 9 months ago

Never seen this happen, but it is possible. What hardware are you using and are you implementing the slower software SPI interface?

elan commented 9 months ago

Custom hardware, with hardware SPI.

MajicDesigns commented 9 months ago

Checking in the data sheet, data is latched in to the MAX72xx hardware on the rising edge of the CS pin, so what is described is a possible scenario. Eliminating the line as proposed or setting the I/O to LOW are the solution. Code will be changed and published in the next release (low priority).