RESOLVED- (Workaround) can we print in specific portion of max7219 matrix module?

Hi, This is my 3rd Arduino based project and this time i am trying to make a digital LED clock and somewhat i am able to display the time (hh:mm) on matrix 7219 modules (4 modules) via DC3231 rtc controlled by Arduino Nano using MD_Parola library.

Now the problme is that i have a very limited space where i want to fit the matrix module. I have 1 inch X 3 inch space avalable and the module overall size is around 1.4 inch X 5 inch so i want to use only a portion of the module and display time in hh:mm or hh:mm:ss format, so its like utlising only the half of the matrix by width and also by height.

Here is my working code printing hello, any help will be appriciated .

#include <MD_Parola.h>
#include <MD_MAX72xx.h>

#define MAX_DEVICES 4
#define CLK_PIN   11
#define DATA_PIN  12
#define CS_PIN    10


void setup () {

void loop () {
   P.print("Hello") ;  

so i want to use only a portion of the module and display time in hh:mm or hh:mm:ss format, so its like utlising only the half of the matrix by width and also by height.

So what sort of display are we talking about?
Is it a matrix or is it a seven segment display?

Going of the code where you want to print hello it would seem to be a matrix, but only using half would not give you enough dots to get all the numbers to look like they do normally..

In any case you will have to design your own dot matrix for the display characters so you need to ditch that library and write to the chip directly, this while not being as easy as a library is not too hard once you get your head round what registers do what in the chip.

Thanks for your quick responce Mike, yes it is a Matrix module looking similr to This

I just want to undersatnd that if 1 Matrix module having 64 LED's can Print 0 to 9 digits then is it possible to use
only 32 LED'S and print same numbers and rest of LED's will be in off position? or maybe try to reduce the font size or set height and width before displaying?

Yes, it's possible to use only 32 of the leds on each module. But can you make legible digits with so few leds?

maybe try to reduce the font size

Yes but you need to make your own font. Try this on a piece of paper first draw a grid 4 squares high and colour them in to see it they are readable or at least distinguishable.

What I don’t understand is you say you have little space but you must have enough for the full display. There are many ther smaller displays you can use than this very big one.

ok just to clarify, I have tried another library called LedController and able to fit all digits using 15 LED’s out of 64.
Below is my working code printing numeric 9 and i am able to print from 0 to 9.
How can i do the same with my previous example of code?

#include "LedController.hpp"
#include <binary.h>

LedController lc;

void setup() {


void loop() { 



I will be using this clock for my “LED Mirror” project wehre i have space to fit all 4 modules but the display area visible from the front of the mirror is limited which i described earlier. I dont want to increase said visible area as the proportion of Mirror size and Clock area will not look good. I have tried .096 OLD earlier which is ofcource too small and i want to use this Matrix module and modiy the code to achive what i am looking for.

Smaller led matrix are available, for example 0.8". You could fit 3 matrices in your available space, so a 24x8. These could be wired to 3 of the PCBs which drive your current matrices (using flexible wires, they might plug in directly but would then have gaps between them).

Example data sheet.

why do you insist on the not fitting dot matrix?
If you just want to display a time, i suggest to use Adafruits 0.56 7 Segment or a cheaper knock off

7-Segment Display Dimensions: 19mm x 50mm x 14mm / 0.75" x 2" x 0.56"

It will be clearly readable - at least as good as a reduced dot matrix. It comes in several colors and also only uses some pins (I2C Interface).

How can i do the same with my previous example of code?

Look at the custom character examples here

Just define your own font. I have already done a small font for the MD_MAXPanel examples (see GitHub - MajicDesigns/MD_MAXPanel: Arduino library to allow a panel of MAX72xx LED matrix modules to be used as a pixel display device. that is 5 LED high by 3 wide. This is about as small as you can get for these modules and still be recognisable. The font file is is the same format as for Parola.

Thank you @Grumpy_Mike and @marco_c, i'll have a look into it in my next project, meanwhile i had new issues with the avalable space to fit the display properly so i have to move to the smaller LCD version of display.
I will mark this post as resolved for now and i will visit the idea of controling the dot matrix font height /width later for sure as i have some other projects in mind.