Cloned display panels

Hi, I just got 2 64x32 rgb led panels, and connected to an mega, and uploaded a sketch, everything work, but a issuse, both panels show same (cloned), that one I not want that, I want use both panels so that are like one (128x32).

RGBmatrixPanel matrix(A, B, C, D, CLK, LAT, OE, false, 64);

This code work fine, but show same on both panels.

RGBmatrixPanel matrix(A, B, C, D, CLK, LAT, OE, false, 128);

Changed to 128, everything messed up on both panels.

How can I fix that?
Panels was bought by Wish, and have number P3-(2121)64*32-16S-D1.0 on board.

Regards

How can I fix that?

Write the code correctly.

However a mega only has 8K of memory. As you want an array for 128 x 32 LEDs and each LED needs three bytes to define them you require
128 * 32 * 3 = 12228 bytes of memory for the array. Therefore this will not fit into a mega. So:-

either
Fit some external SDRAM to the mega and rewrite the driving libiary
or
Use an Arduino like the Due or Zero that has enough storage memory and boost the 3V3 signals to 5V to drive the display. Depending on how the libiary is written you may need to rewrite that as well.

Hm, but i dont use as graphic, only text (4 lines) so that might not use much memory. Will use to rc race timer laps, so that only show 4 best players (maybe 3 too?) controlled by software (Zround).

but i dont use as graphic, only text (4 lines) so that might not use much memory.

Makes no odds what you use it for, each pixel needs to be controlled therefore each pixel needs to be defined.

Unless the panel has its own memory inside it, then those LED information must be stored somewhere and that is on the Arduino.

DragonII:
Hm, but i dont use as graphic, only text (4 lines) so that might not use much memory.

Yes, in theory that could be done and would save memory. Each 8x8 group of pixels would display one character, 64 characters in total, requiring 64 bytes. For colour data, you could store the colour of each character as 1 byte (assuming only red, green, blue, yellow, cyan, magenta or white on black background for all characters) requiring another 64 bytes. So not much ram in total.

Problem is, the AdaFruit library does not do it like that. You would have to abandon that library and write your own from scratch. This would be a serious challenge for an experienced coder who had the same panels you have and plenty of time.

So Mike's advice about choosing an Arduino compatible board with more memory might be an option. However, it may be that the AdaFruit library requires a board that is 100% compatible with Uno/Mega (ie. an AVR chip) and may not work even with Due. Modifying the AdaFruit library to use extra ram attached to an AVR based Arduino, or to run on another chip Teensy, esp8266 etc. would also be a challenge for an experienced coder.

To summarise, sorry, I can't think of an easy option to drive these displays.

On this page it says:

The library works ONLY with the Arduino Uno and Mega. Other boards (such as the Arduino Leonardo) ARE NOT SUPPORTED.

So not even all AVR chips are supported. Elsewhere it says:

Displays are 'chainable' - connect one output to the next input - but our Arduino example code does not support this yet

Yes, in theory that could be done and would save memory. Each 8x8 group of pixels would display one character, 64 characters in total, requiring 64 bytes.

Given the information in How the Matrix Works | 32x16 and 32x32 RGB LED Matrix | Adafruit Learning System
I can't see how you would multiplex the whole matrix without a whole array buffer.

Grumpy_Mike:
I can’t see how you would multiplex the whole matrix without a whole array buffer.

The Arduino must send, for two matrices, 48 bytes per scan line, and repeat for 32 scan lines. If it is as simple as rendering 8x8 fonts in fixed positions and 8 colours, I think it would be achievable to render a single whole line into a 48 byte buffer, ready for the next scan line. If you code it cleverly you might not even need the 48 byte buffer, just render 8 pixels (=1 row of one character) into 3 bytes and shift them out. Repeat for 16 characters and a line is done.

This is how things were done, I assume, on early colour CRT monitors (like those made by DEC, IBM etc). They would not have had enough ram to render the entire image of 80x24 characters at once. Later models that could draw graphs etc, must have had enough ram to map the entire screen, but ram was getting cheaper by then.

This is how things were done, I assume, on early colour CRT monitors

No they used to put the memory location contents consisting of ASCII characters ( 6 or 7 bits ) through a character generator ROM, and from there into a shift register where they were clocked out at the pixel rate. Each ASCII text row then was scanned 7 or 8 times, each time with a different three bit "Row look up address". The colour information was only another three bits which directed the output of the shift register into the R, G or / and B video outputs.

... and that's exactly the algorithm I am suggesting could be used with these displays (implemented in software). It would be slower than a hardware implementation, of course, but there are far fewer pixels to be refreshed than on a CRT.

It's also the technique used on the ZX80/81. With only 1K ram, there was no room for a full display buffer. Yet it produced a 32x24 text display, albeit black & white, mainly in software, on a 4MHz CPU.

Well, so the Mega cant run 2 panels due limited of memory. So I have 2 choices: Run only 1 panel with Mega and make it scrollable texts or buy a Raspberry Pi that can run 2 panels.

Raspberry Pi that can run 2 panels.

Can it?
Multiplexing on a Linux operating system is tricky because it keeps wandering off to do OS stuff so it is not time consistent.

I rarely advise this but how about two Megas?

Grumpy_Mike:
Can it?
Multiplexing on a Linux operating system is tricky because it keeps wandering off to do OS stuff so it is not time consistent.

I rarely advise this but how about two Megas?

Hm, 2 megas, how should it work, the software Zround using 1 COM port (by USB), and sending ASCII text so how to split up and put on panels?

Look like that you think?

Yes, that wiring between two megas would be a serial link. The mega has three extra serial ports so you them to communicate.

the software Zround

Do you know the protocol of the messages that this software sends? You can't simply pass on the messages because that will result in the two displays being the same. You have to separate out information that needs to be sent to the second panel and send that to the second mega.

So one of them should split up messages from the pc, like a example:

P1:DragonII,Lap Time 00:10:35, Best: 00:10:35
P2:Rymden IIS, Lap time 00:11:40, Best: 00:11:40
P3:Janne, Lap Time 00:12:01, Best: 00:12:01 etc....

So it might will be hard to split up 2 parts of every lines to Mega 1 and Mega 2 due using only 1 Com port from pc.

No that should be simple enough to split these strings ( note strings not Strings ) where you would like to split the information between the two screens.