Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increasing device amount capability to 2^32 #63

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

vadimostanin
Copy link

No description provided.

@MajicDesigns
Copy link
Owner

Nice that you have defined a type for the module count. How come you chose 32 bit count instead of 16 bit? Also, is 8 bit (255 devices) some kind of limitation?

@vadimostanin
Copy link
Author

Physically I use four matrixes module, but for long text scrolling emulation I pass > 100 devices to MD_MAX72XX constructor.

Here is my code, that is based on your example "MD_MAX72XX\examples\MD_MAX72xx_PrintText"
https://github.com/vadimostanin/MD_MAX72xx_PrintText_CyclingLongText

16 bit is enough, I added commit.

Thank you for MAX7219 library.

@MajicDesigns
Copy link
Owner

OK, so you are simulating.

The issue for me is that in a practical (real) system, 255 matrices at 200mA each will already need 50A at 5V (ie, 250W power supply). That is a lot of power to manage over a long distance, not to mention the issue of distributing the digital signals over the matrix so that everything works properly. The amount of memory required will also be quite high, although that may be manageable in more capable processors. Real world matrix to matrix signal propagation delays over longer distances also create issues with display update times.

Altogether, for massively large displays this technology is not really suitable. A practical limit on the number of devices is around 40-50 which is what some people have made, and these are not beginners doing these projects.

My concern is that making this change, so that the number of devices can be large, will create a false impression and I would hesitate to include this push request at this time.

@vadimostanin
Copy link
Author

I understand your concerns about not reality of hardware.
But the circled buffer with "control(MD_MAX72XX::WRAPAROUND)" is very simplify showing the scroll of long text.
The only condition for long text is passing virtual devices to constructor.
Easy implementation of scrolling long text is good feature, IMHO.
16 bits would cover all needs, (my and, possibly, others) for possible future usage.

@camila2308
Copy link

hola que tal, quisiera una ayuda, tengo 2 pantallas max matrix 7219 de 8x32 y tengo que conectarla con unos botones de arcade, en el cual en la pantalla queremos que salga el puntaje cada vez que apretas el boton, si lo precionas bien se sumaria 10, si lo precionas mal, se le restan 5, hemos intentado con diferentes programaciones y ninguna nos resulta util. desde ya muchas gracias por su atencion!

@vadimostanin
Copy link
Author

Hello @camila2308

hola que tal, quisiera una ayuda, tengo 2 pantallas max matrix 7219 de 8x32 y tengo que conectarla con unos botones de arcade, en el cual en la pantalla queremos que salga el puntaje cada vez que apretas el boton, si lo precionas bien se sumaria 10, si lo precionas mal, se le restan 5, hemos intentado con diferentes programaciones y ninguna nos resulta util. desde ya muchas gracias por su atencion!

I think that You have two options:

  1. Connect 2 8x32 MAX7219 to be one 8x64 with flexible wires and stack as you want and in code just increase MAX_DEVICES to 8, and then construct string ( that should be shown ) that follow your requirements
    MD_MAX72XX mx = MD_MAX72XX(HARDWARE_TYPE, CS_PIN, MAX_DEVICES);

  2. Connect 2 8x32 MAX7219 in parallel to SPI pins CLK, MOSI, MISO, but for each CS MAX7219 pin use any unbusy pins of your board, and in code
    construct two MD_MAX72XX objects with different CS (CS_PIN_1, CS_PIN_2) and MAX_DEVICES is equal (4),
    MD_MAX72XX mx = MD_MAX72XX(HARDWARE_TYPE, CS_PIN_1, MAX_DEVICES);
    MD_MAX72XX mx = MD_MAX72XX(HARDWARE_TYPE, CS_PIN_2, MAX_DEVICES);

And LED matrix should work independently

As I found at https://www.reddit.com/r/embedded/comments/pahmc7/spi_communication_with_multiple_slaves/

CLK, MOSI, MISO. Connect these to all your devices on the bus. no muxing needed.
The CS (Chip Select) is what tells the slave chip your talking to it, so all the other chips will shut up. Just pull the CS of the chip you want to talk to low, do your communication, release the line and move to the next chip CS.

I will be glad if I helped.

Kind regards,
Vadym

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants