Using MAX7221 to drive an 8x8 LED Matrix.
Testing with sketch "MD_MAX72xx_HW_Mapper" from MD__MAX72XX library. Have not modified code.
Problem: MAX7221 Segment and Digit pins are not outputting anything.
The Arduino does have signal outputs on CLK, DIN and CS pins. Mapper code works on Arduino, but MAX does not respond.
Schematic attached. (shows MAX7219 although using MAX7221)
ISET resistor set at 25K
Ok, I figured it out. You edit both files. Posted here in case anyone else is trying to figure it out.
MD_MAX72xx.h -
Under the correct #define section where you show what type of LED Matrix you are using, set to 1 for your hardware. Set others to 0.
\def USE_OTHER_HW
Set to 1 to use other hardware not defined above.
Module 0 (Data In) must be set up on the RHS and the CUSTOM hardware defines
must be set up in the MD_MAD72xx_lib.h file under for this section, using the HW_Mapper
utility to work out what the correct values to use are.
*/ #define USE_OTHER_HW 1
MD_MAX72xx_lib.h -
In the section that mathes up with what you selected for hardware in MD_MAX72xx.h set these to correct on or off. i used HW Mapper to find out they should be 1 0 0.
#if USE_OTHER_HW // user defined custom hardware configuration
//#pragma message "OTHER HW selected" #define HW_DIG_ROWS 1 ///< MAX72xx digits are mapped to rows in on the matrix #define HW_REV_COLS 0 ///< Normal orientation is col 0 on the right. Set to 1 if reversed #define HW_REV_ROWS 0 ///< Normal orientation is row 0 at the top. Set to 1 if reversed #endif