Go Down

Topic: 16x16 sprite display (Read 174 times) previous topic - next topic

DeloreanGrey

Ive made a 16x16 led matrix,  made from 4 x max7219 modules, what I want to do is use it as a large sprite  display

The best result I've had so far is using MaxMatix.h , write sprite,  right shift 8 times, write sprite etc.

The problem is you can see all the leds changing in realtime.  What I want to do is switch off the led update,  load all data, switch on led update. For flicker free animation.

All my other reserarch attempts have been confusing,  looked at parola.h, Sprite.h, matrix.h LedControl.h and LedControlMS.h

Biggest problem is working out which library is the most current and working. A lot of stuff seems to be out of date.

What can you recommend? Most multiple led matrix projects seem to be based on text scrolling,  I can define 4 characters as sprites using binary,  I just don't want to see it scroll as I load it up.

I've looked at the MAX7219 datasheet and I think my problem is the load/cs pin switching on and off between writesprites . I'm thinking that I need to go deep into the MaxMatrix.cpp file, look at the writeSprite function and comment out   the CS = True/false line and that should stop the data registers being transferred to the leds,  then when I've finished with all my writeSprite, shift right, write sprite stuff and set CS = false externally to the function. Am I thinking along the right lines?


marco_c

#1
May 15, 2019, 11:55 pm Last Edit: May 15, 2019, 11:57 pm by marco_c
Your technique only works if the library has a buffer for the display and makes the changes locally before sending them through the SPI interface.

I can tell you definitely that in the MD_MAX72xx library you can turn off display updates until you have finished making your changes and then turn them back on. This gives you absolutely flicker free animations and are used in the MD_Parola and MD_MaxPanel libraries all the time.

If MaxMatrix allows the same then that is the technique you should be using there as well.
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

DeloreanGrey

There is a writesprite function in max matrix but that only writes to one module at a time, the shift right is done in realtime and thats visible.  And that is where my problem lies.

marco_c

Maybe use the writesprite() function in MaxMatrix (copy it to your code) and adapt it for MD_MAX72xx so that you can get the control.

If you have a panel then the MD_MAXPanel may be a better option, but this depends on your skills and your application.
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

Go Up