Cascading Max7219 #1079
Replies: 14 comments
-
Posted at 2014-03-19 by Loop By the looks of it, you could put them on different spi pins, and write some glue to make it look like a single 16x8 display |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-03-19 by @gfwilliams It doesn't do it right now, but the changes required are trivial. To cope with multiple drivers it seems that you just send the two different bits of data to the same address while keeping CS asserted. Arduino's library here: https://github.com/lstoll/arduino-libraries/blob/master/Matrix/Matrix.cpp#L129 So it's probably as simple as changing:
to:
One nice extra is that you can actually use Espruino's built-in graphics library with it, so you can do something like...
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-03-19 by @gfwilliams Having said that, you may need to send the same addresses to each chip. So:
I don't have one here to play with and test but it should be pretty easy to get working. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-03-19 by user6772 Great. I will test it at the weekend. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-03-22 by user6772 Hi, I tested it with the following code and it does not work.
Here is a video. Do you have any idea what I did wrong? Regards |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-03-24 by @gfwilliams I think there might have been some misunderstanding about my last post... You probably need to send all of the row 0s, followed by all row 1s, etc. So more like:
I wonder if that'll be better? By the way, when posting code, if you highlight it and click the 'code' button, it'll appear properly in the forum (i just changed yours). |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-03-30 by user6772 Hi, i took the new raw function and tested it again. It does not work at the moment.
To see more details about the send-data, i added some print statements.
=undefined |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-03-31 by @gfwilliams Yes, it's not quite right. It should stop after row 7. I think what you want is:
Try:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-05-14 by @gfwilliams Just to add that I (finally) added support for multiple displays, now I have one to test with. All documented here: http://www.espruino.com/MAX7219 Under 'Multiple chained MAX7219 (bigger than 8x8)' |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-02-24 by Sigma I got a big Matrix LED : 32 x 16 How to set the device count ? SPI2.setup({mosi:B15, sck:B13});
var disp = require("MAX7219").connect(SPI2, B14, 8); // 8 seems not work
var g = Graphics.createArrayBuffer(32, 16, 1);
g.flip = function() { disp.raw(g.buffer); };
g.drawString("Hello!", 0, 0, 1);
g.flip(); |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-02-24 by @gfwilliams Does this work:
The issue may be that Espruino isn't aware that you want a 4x2 stack of matrices, and just assumes it is 8x1. I don't see anything in the module that would be limited to just 4 matrices. If the code above does work then it's not a big problem - it's relatively easy to add some code that will rearrange things into the format that you want. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-02-25 by Sigma Yeah,I have got it. Thx! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-02-25 by @gfwilliams Great! Did you figure out how to sort the ordering? Something like this should do it...
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-05-10 by Sigma
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-03-19 by user6772
Hi,
i want to cascade multiple Max7219 8x8 LED like https://www.pjrc.com/teensy/td_libs_Matrix.html. Is this possible with the http://www.espruino.com/modules/MAX7219.js module?
Beta Was this translation helpful? Give feedback.
All reactions