MAX7219 32x32 LED Display
-
kaqkk007
- Posts: 68
- http://meble-kuchenne.info.pl
- Joined: Sat Feb 04, 2023 1:09 pm
- Has thanked: 4 times
- Been thanked: 2 times
Re: MAX7219 32x32 LED Display
I like the idea—could 8×8 be the basic “unit of measurement,” with the rest added “digit by digit”?
-
mnfisher
- Valued Contributor
- Posts: 2004
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 158 times
- Been thanked: 943 times
Re: MAX7219 32x32 LED Display
I added both... Yes - a 16 x 16 character could be drawn as 4 8x8 blocks...
Here a very simple demo (for simulation) - I call it 'space tunnel'
There is a Write8 and a Write16. 16x16 characters need 4 x the memory of 8 x 8 - so use sparingly in hardware?
I found some interesting ways to crash FC - pasting in too large an array (uint anim[6][16] - I pasted in uint [9][16]) and this causes bad things to happen... Also I originally made 'anim' a constant - but nothing is drawn in simulation?
Using a LUT - this would require a copy of the data to an array to pass to the Write(n) macro...
Another idea - add a ClearPixel (or an extra parameter to plot) to allow pixels to be cleared individually?
Martin
Here a very simple demo (for simulation) - I call it 'space tunnel'
There is a Write8 and a Write16. 16x16 characters need 4 x the memory of 8 x 8 - so use sparingly in hardware?
I found some interesting ways to crash FC - pasting in too large an array (uint anim[6][16] - I pasted in uint [9][16]) and this causes bad things to happen... Also I originally made 'anim' a constant - but nothing is drawn in simulation?
Using a LUT - this would require a copy of the data to an array to pass to the Write(n) macro...
Another idea - add a ClearPixel (or an extra parameter to plot) to allow pixels to be cleared individually?
Martin
- Attachments
-
- Display4x4Max7219.fcpx
- (4.99 KiB) Downloaded 25 times
-
- max7219x16_component_lut.fcfx
- (38.25 KiB) Downloaded 24 times
-
- led2.fcfx
- (11.31 KiB) Downloaded 26 times
-
mnfisher
- Valued Contributor
- Posts: 2004
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 158 times
- Been thanked: 943 times
Re: MAX7219 32x32 LED Display
Yes, if you like...
For example, the space tunnel would be a |_ shape and draw on four rotations - add a 'direction' parameter to Write8 (it would complicate it a bit, but it's not that difficult - use data bottom to top to flip vertically etc)
I'd wanted 'big' 16*16 digits for a clock's alternate (cop out) display mode - it displays the time as a QR code
- for a (only slightly) pointless idea I had! I never quite got the digits quite right though.
Martin
For example, the space tunnel would be a |_ shape and draw on four rotations - add a 'direction' parameter to Write8 (it would complicate it a bit, but it's not that difficult - use data bottom to top to flip vertically etc)
I'd wanted 'big' 16*16 digits for a clock's alternate (cop out) display mode - it displays the time as a QR code
Martin
-
Steve-Matrix
- Matrix Staff
- Posts: 1896
- Joined: Sat Dec 05, 2020 10:32 am
- Has thanked: 278 times
- Been thanked: 445 times
Re: MAX7219 32x32 LED Display
Unfortunately I have not been able to replicate the situation where Flowcode bombs out. Is there a particular fcpx file that does this, and are there any specific steps required to replicate the crash?Steve-Matrix wrote: ↑Mon May 25, 2026 4:28 pmThanks. I will have a look to see if I can determine why this component is causing a crash.
-
mnfisher
- Valued Contributor
- Posts: 2004
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 158 times
- Been thanked: 943 times
Re: MAX7219 32x32 LED Display
I can get the last .fcpx file to do the same..
Flowcode v10 (not sure of the version no?)
New project - PIC 18f252
Components -> Search -> Display4x4 -> double click -> gives 'failed to add' then crash reporter.
I can't replicate it quite today - but create a variable uint t[6][16] and paste in the following - then if I do Write16(8, 8, t[.n]) then it gives 't' not found - though yesterday FC locked (repeatedly)
And yes - it is an invalid initialiser (but not reported as such?)
Setting a constant t[6][16] (with a valid initialiser in v11) - doesn't work correctly (in simulation) - but converting to a variable does (see led2 above)
Martin
Flowcode v10 (not sure of the version no?)
New project - PIC 18f252
Components -> Search -> Display4x4 -> double click -> gives 'failed to add' then crash reporter.
I can't replicate it quite today - but create a variable uint t[6][16] and paste in the following - then if I do Write16(8, 8, t[.n]) then it gives 't' not found - though yesterday FC locked (repeatedly)
Code: Select all
{{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,0x0000,0x0000 },
{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0180,0x0180, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x03C0, 0x0240,0x0240, 0x03C0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x07E0, 0x0420, 0x0420,0x0420, 0x0420, 0x07E0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0FF0, 0x0810, 0x0810, 0x0810,0x0810, 0x0810, 0x0810, 0x0FF0, 0x0000, 0x0000, 0x0000, 0x0000 },
{ 0x0000, 0x0000, 0x0000, 0x1FF8, 0x1008, 0x1008, 0x1008, 0x1008,0x1008, 0x1008, 0x1008, 0x1008, 0x1FF8, 0x0000, 0x0000, 0x0000 },
{ 0x0000, 0x0000, 0x3FFC, 0x2004, 0x2004, 0x2004, 0x2004, 0x2004,0x2004, 0x2004, 0x2004, 0x2004, 0x2004, 0x3FFC, 0x0000, 0x0000 },
{ 0x0000, 0x7FFE, 0x4002, 0x4002, 0x4002, 0x4002, 0x4002, 0x4002,0x4002, 0x4002, 0x4002, 0x4002, 0x4002, 0x4002, 0x7FFE, 0x0000 },
{ 0xFFFF, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0xFFFF }}Setting a constant t[6][16] (with a valid initialiser in v11) - doesn't work correctly (in simulation) - but converting to a variable does (see led2 above)
Martin
-
Steve-Matrix
- Matrix Staff
- Posts: 1896
- Joined: Sat Dec 05, 2020 10:32 am
- Has thanked: 278 times
- Been thanked: 445 times
Re: MAX7219 32x32 LED Display
Thanks, Martin - that's really helpful.
I can't get the Display4x4 crash to happen, but I noticed that other issue in our bug reports and I tried to work out why it was causing a problem (without success). But knowing the initialiser is a massive help and I should be able to sort that this afternoon.
I can't get the Display4x4 crash to happen, but I noticed that other issue in our bug reports and I tried to work out why it was causing a problem (without success). But knowing the initialiser is a massive help and I should be able to sort that this afternoon.