Page 4 of 4

Re: MAX7219 32x32 LED Display

Posted: Mon May 25, 2026 7:33 pm
by kaqkk007
I like the idea—could 8×8 be the basic “unit of measurement,” with the rest added “digit by digit”?

Re: MAX7219 32x32 LED Display

Posted: Mon May 25, 2026 8:52 pm
by mnfisher
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

Re: MAX7219 32x32 LED Display

Posted: Tue May 26, 2026 3:52 am
by kaqkk007
Wouldn't an 8x8 size be enough? Could we store every character in that format and then resize them later using some trick?

Re: MAX7219 32x32 LED Display

Posted: Tue May 26, 2026 7:11 am
by mnfisher
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

Re: MAX7219 32x32 LED Display

Posted: Tue May 26, 2026 9:42 am
by Steve-Matrix
Steve-Matrix wrote:
Mon May 25, 2026 4:28 pm
Thanks. I will have a look to see if I can determine why this component is causing a crash.
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?

Re: MAX7219 32x32 LED Display

Posted: Tue May 26, 2026 11:26 am
by mnfisher
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)

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 }}
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

Re: MAX7219 32x32 LED Display

Posted: Tue May 26, 2026 12:20 pm
by Steve-Matrix
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.