Velleman VMA419 in series

Hello everyone ! :sunglasses:

I come to ask my problem here because on the Velleman forum it’s asleep.
The Arduino forum has always been a great source of inspiration and answers for me.

Thank you in advance for your patience and your help !

I received this product : Velleman VMA419

I have two and I want to scroll through text on both. Same text on one screen but with two matrix.

I control it with an Arduino Uno and the library available of the Velleman website “VMA419_library.zip”.

In fact the VMA419 product is a copy of the Freetronics DMD, the library is proof of that. It is marked “Freetronics” inside.

But the Velleman library is different. They work fine with the VMA419.

The DMD Freetronics library, it does not work with the VMA419, glitch are present.

My problem: My two panels work, the text scrolls but it is twice the same display.
the line of my code “#define DISPLAYS_ACROSS 2” does not seem to take my two screens.

I am not alone on the Velleman Forum to have this problem. But no solution for now …
VellemanForum#1
VellemanForum#2

You will find my code in attachment, I tested it with the library of Velleman and Freetronics.

The Freetronics library shows me a glitchy text but seems to take my two screens. The glitchy “text” scrolls well on my two panels.

I also analyzed the two libraries, is the paragraph on the SPI which is different.
Specifically in the DMD.cpp file.
So, i gathered the differences in the file “SPI dif.pdf”

Thank you the arduino team !

DMD419.cpp (20.3 KB)

DMD.cpp (19.2 KB)

dmd_VMA419_TEXTSCROLL.ino (3.83 KB)

SPI dif.pdf (24.1 KB)

I think you may be on to something. The code you identified:

for (int i=0;i<rowsize;i++) {
 SPI.transfer(~bDMD419ScreenRAM[offset+0+row3]); 
 SPI.transfer(~bDMD419ScreenRAM[offset+0+row2]);
 SPI.transfer(~bDMD419ScreenRAM[offset+1+row3]);
 SPI.transfer(~bDMD419ScreenRAM[offset+1+row2]);
 SPI.transfer(~bDMD419ScreenRAM[offset+0+row1]);
 SPI.transfer(~bDMD419ScreenRAM[offset+0]);
 SPI.transfer(~bDMD419ScreenRAM[offset+1+row1]);
 SPI.transfer(~bDMD419ScreenRAM[offset+1]);
 SPI.transfer(~bDMD419ScreenRAM[offset+2+row3]); 
 SPI.transfer(~bDMD419ScreenRAM[offset+2+row2]);
 SPI.transfer(~bDMD419ScreenRAM[offset+3+row3]);
 SPI.transfer(~bDMD419ScreenRAM[offset+3+row2]);
 SPI.transfer(~bDMD419ScreenRAM[offset+2+row1]);
 SPI.transfer(~bDMD419ScreenRAM[offset+2]);
 SPI.transfer(~bDMD419ScreenRAM[offset+3+row1]);
 SPI.transfer(~bDMD419ScreenRAM[offset+3]);
 }

This for-loop’s control variable “i” is not used within the loop! I suspect when Velleman adapted the Freetronics library for their display, they did not test it with multiple displays. The maximum value of “i” in the loop will be different for multiple displays, but if course the value of “i” is not used, so the same data is sent multiple times, resulting in duplication.

In the Freetronics version, the value of “i” is used inside the loop:

for (int i=0;i<rowsize;i++) {
 SPI.transfer(bDMDScreenRAM[offset+i+row3]);
 SPI.transfer(bDMDScreenRAM[offset+i+row2]);
 SPI.transfer(bDMDScreenRAM[offset+i+row1]);
 SPI.transfer(bDMDScreenRAM[offset+i]);
 }

so different data is sent on each iteration.

Velleman have a GitHub site, but unfortunately there is no repository for their VMA419 library there. This would have been the ideal place to raise an issue and collaborate with Velleman on a solution, which everyone could then access. If you can communicate with Velleman, you should ask them to add a repository for the VMA419 library there.

Ah yes ! thank you for your response PaulRB.

These lines are beyond my knowledge.
So I'm not sure what she means. I will try to contact Velleman.

But is it possible to rewrite the code without the help of Velleman?

Edit: I contacted Velleman with the email address on their github page.

Possible but perhaps difficult. Do you have a schematic of the internal circuit of VMA419? The data is sent in a strange sequence to the Velleman display, compared to the simple sequence sent to the Freetronics display. The schematic might help with understanding why the data is sent in that sequence.

No I do not have the schematic of the VM419 …

Impossible also to read references of the components.
there is like super glue on it, which gives a slightly greasy shiny effect. Certainly due to wave soldering. It’s CMS components.


Try this:

for (int i=0;i<rowsize;i+=4) {
 SPI.transfer(~bDMD419ScreenRAM[offset+i+0+row3]);
 SPI.transfer(~bDMD419ScreenRAM[offset+i+0+row2]);
 SPI.transfer(~bDMD419ScreenRAM[offset+i+1+row3]);
 SPI.transfer(~bDMD419ScreenRAM[offset+i+1+row2]);
 SPI.transfer(~bDMD419ScreenRAM[offset+i+0+row1]);
 SPI.transfer(~bDMD419ScreenRAM[offset+i+0]);
 SPI.transfer(~bDMD419ScreenRAM[offset+i+1+row1]);
 SPI.transfer(~bDMD419ScreenRAM[offset+i+1]);
 SPI.transfer(~bDMD419ScreenRAM[offset+i+2+row3]);
 SPI.transfer(~bDMD419ScreenRAM[offset+i+2+row2]);
 SPI.transfer(~bDMD419ScreenRAM[offset+i+3+row3]);
 SPI.transfer(~bDMD419ScreenRAM[offset+i+3+row2]);
 SPI.transfer(~bDMD419ScreenRAM[offset+i+2+row1]);
 SPI.transfer(~bDMD419ScreenRAM[offset+i+2]);
 SPI.transfer(~bDMD419ScreenRAM[offset+i+3+row1]);
 SPI.transfer(~bDMD419ScreenRAM[offset+i+3]);
 }

Wow! You’re the best, thank you PaulRB.

Your code seems to restore the function “#define DISPLAYS_ACROSS” and works well on my two screens!
My text scrolls on the screen composed of two panels.

I’m going to do some tests but it works ! :wink:

Thanks again for your help.

In attachment, the library of VMA419 from Velleman corrected with the code of PaulRB which repairs the function “#define DISPLAYS_ACROSS”.

DMD419_REV1.zip (32 KB)