Results 1 to 3 of 3
  1. #1
    75+ Posting Member vikingsraven's Avatar
    Join Date
    Dec 2012
    Location
    UK
    Posts
    89
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    max7219 boards issue

    HI guys, just got 7 off the max7219 boards from ebay, having the devils own time trying to get them to work in series, they all work fine separately , but when i daisy chain 2 or more the second board only lights up with all the segments, the first one runs ok, written some code to display com 1 info and that working ok for the first display but nothing on the second.
    Anyone else had this? im going to stick a scope on the board at work tomorrow to see if its chucking out the right info, had some leds on the output and the clk and the load seem to be correct.
    cheers
    Code:
    #include"LedControl.h"
     led_Disp = LedControl(12, 10, 11, 8);
    // 12 data, 10, clk, 11 cs ,8 no of devices
    
    
    
    
    int CodeIn;
    void setup() {
      led_Disp.shutdown(0, false);
      delay (500);
      led_Disp.shutdown(1, false);
      delay (500);
      led_Disp.setIntensity(0, 3);
      led_Disp.clearDisplay(0);
      delay (500);
      led_Disp.shutdown(1, false);
      delay (500);
      led_Disp.setIntensity(1, 3);
      led_Disp.clearDisplay(2);
      delay (500);
      Serial.begin(115200);
    }
    
    
    
    
    
    
    void loop() {
    
    
      if (Serial.available())
      {
        CodeIn = getChar();
        if (CodeIn == '=')
        {
          EQUALS();              // The first identifier is "="
        }
      }
    
    
    }
    
    
    //*********************************************************
    char getChar()// Get a character from the serial buffer
    {
      while (Serial.available() == 0);  // wait for data
      return ((char)Serial.read());     // Thanks Doug
    }                                   // end of getChar
    //*****************************************************************
    //*****************************************************************
    
    
    
    
    void EQUALS() {     // The first identifier was "="
      CodeIn = getChar(); // Get another character
      switch (CodeIn) { // Now lets find what to do with it
        case 'C': {   //COMM1 Active
    
    
            led_Disp.setDigit(0, 7, getChar() - '0', false);
            led_Disp.setDigit(0, 6, getChar() - '0', false);
            led_Disp.setDigit(0, 5,  getChar() - '0', true);
            int DP = getChar() - '0';
            led_Disp.setDigit(0, 4, getChar() - '0', false);
            led_Disp.setDigit(0, 3, getChar() - '0', false);
    
    
            break;
          }
    
    
        case 'D':   { //COMM1 Active
    
    
            led_Disp.setDigit(0, 1, getChar() - '0', false);
            led_Disp.setDigit(0, 0, getChar() - '0', false);
            led_Disp.setDigit(1, 7, getChar() - '0', true);
            int DP = getChar() - '0';
            led_Disp.setDigit(1, 6, getChar() - '0', false);
            led_Disp.setDigit(1, 5, getChar() - '0', false);
    
    
            break;
          }
      }
    }

  2. #2
    150+ Forum Groupie
    Join Date
    Nov 2013
    Location
    Evansville, Indiana
    Posts
    243
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: max7219 boards issue

    Be sure to run a separate 5v and ground to other display cards. If you chain the 5v you lose voltage with each card from an onboard diode.
    I will only ever be, half the Geek that I wished I was.
    TheGeekForge.Com

  3. Thanks Tom_G_2010 thanked for this post
  4. #3
    300+ Forum Addict Tom_G_2010's Avatar
    Join Date
    Mar 2011
    Location
    Central Mass
    Posts
    437
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: max7219 boards issue

    Fess_ter, I don't know if that little tip helped the OP, but it sure put me back in action. I was daisy chaining the power and ground and the third board was acting flaky. If I added 4 or more boards everything went nuts.

    But, I just powered each directly and things are working great! Now if I could get my encoders to play nice I'd be in great shape.
    https://www.facebook.com/mycessnasim PC: Intel Core i7 Haswell @ 3.8GHz, 8Gb Ram, Win 7 64Bit, dual SSDs, GeFroce 780 SIM: FSX w/Aclrtn Pk, FSUIPC4, ASN, UTX, GEX, REX 4

  5. Thanks Fess_ter thanked for this post