0

I'm using a max7219 like this one max7219. When I first tested my circuit, I used an 8x8 display and the code worked just fine. Now, after I modified the code with the one that can be found online at arduino code and changed the display with the chained one, the text appears to be mirrored on the matrix display.

like in this picture.

Below, I'll attach part of the code. Please help me find the problem.

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

// Define the number of devices we have in the chain and the hardware interface

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

// Hardware SPI connection
MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
// Arbitrary output pins
// MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);

void setup(void)
{
  P.begin();
  P.displayText("Hello", PA_CENTER, 0, 0, PA_PRINT, PA_NO_EFFECT);
}

void loop(void)
{
  P.displayAnimate();
}
  • Changing the incorrect line to #define HARDWARE_TYPE MD_MAX72XX::FC16_HW did the trick. It took time to find, but thanks a million!!! – mark Hussey Nov 15 '18 at 1:18
3

Since version 3.0 MD_MAX72xx.h no longer supports that definition. Now the hardware type is defined as a parameter on creation (in the "Example" file you are using - not in MD_MAX72xx.h)

#define HARDWARE_TYPE MD_MAX72XX::FC16_HW
...
MD_Parola P = MD_Parola(HARDWARE_TYPE, CS_PIN, MAX_DEVICES);

Note that I've changed the hardware type from PAROLA_HW to FC_16.

2

Check the configuration in MD_MAX72xx.h file and ensure you have the right module selected.

For example there is a define

#define USE_PAROLA_HW   0

if your hardware is this item then turn off the other hardware settings and turn this one on so it reads as follows:

#define USE_PAROLA_HW   1

there many other settings if it is not there then you will have to experiment until you find the correct one.

0

In library, change #define USE_GENERIC_HW 0 to #define USE_GENERIC_HW 1 is the solution.

-1

In latest version of #include <MD_Parola.h>, #include <MD_MAX72xx.h> you have to define the following and characters will display correctly.

#define HARDWARE_TYPE MD_MAX72XX::FC16_HW
  • 1
    Isn't that what @Den1al said in their answer? – sempaiscuba Oct 19 '18 at 18:31

protected by Community Feb 22 at 0:46

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.